Mercurial > hg > octave-lyh
diff doc/interpreter/numbers.txi @ 6715:c729dcb215c6
[project @ 2007-06-13 11:06:47 by dbateman]
author | dbateman |
---|---|
date | Wed, 13 Jun 2007 11:06:47 +0000 |
parents | b26a8e0e42cd |
children | 083721ae3dfa |
line wrap: on
line diff
--- a/doc/interpreter/numbers.txi +++ b/doc/interpreter/numbers.txi @@ -447,6 +447,13 @@ works on integers of the same type. So, it is possible to add two 32 bit integers, but not to add a 32 bit integer and a 16 bit integer. +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 of the 64 bit integer types. + When doing integer arithmetic one should consider the possibility of underflow and overflow. This happens when the result of the computation can't be represented using the chosen integer type. As an example it is