octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

uint64 documentation


From: John W. Eaton
Subject: uint64 documentation
Date: Fri, 17 Dec 2010 01:13:52 -0500

On 16-Dec-2010, Rik wrote:

| Jaroslav,
| 
| I'm updating the documentation for the 3.4 release.  This section from
| 4.4.1 on Integer Arithmetic seems to be out-of-date and does not reflect
| the addition of the int64 and uint64 types.  Is that right?
| 
| "The arithmetic operations on integers are performed by casting the integer
| values to double precision values, performing the operation, and then
| re-casting the values back to the original integer type. As the double
| precision type of Octave is only capable of representing integers with up
| to 53 bits of precision, it is not possible to perform arithmetic
| with 64 bit integer types."

Yes, this is not correct for the current sources.

In the original implementation of arithmetic for integers, we used
doubles and cast the result back to the int type, along with forcing
the result to be within the range of the original type.  That was an
easy way to provide the saturation semantics necessary for
compatibility with Matlab.

Later, Jaroslav implemented integer arithmetic that did not rely on
conversion to and from double.  He also implemented arithmetic
operations for 64-bit integers.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]