Lua is faster than Fortran???

sturlamolden sturlamolden at yahoo.no
Sun Jul 4 12:50:00 EDT 2010


On 4 Jul, 18:34, David Cournapeau <courn... at gmail.com> wrote:

> I sincerly doubt it - where do take the information that matlab use
> float to represent int ?

I've used Matlab since 1994, so I know it rather well...

Only the recent versions can do arithmetics with number types
different from double (or complex double).

> It would not be able to represent the full
> range of 64 bits integer for example.

There is a 53 bit mantissa plus a sign bit. Nobody complained on 32
bit systems. That is, when the signed 54 bit integer contained in a
double was overflowed, there was a loss of precision but the numerical
range would still be that of a double.

You get an unsigned integer in MATLAB like this

  x = uint64(0)

but until recently, MATLAB could not do any arithmetics with it. It
was there for interaction with Java and C MEX files.

A long double has a mantissa of 64 bit however, so it can represent
signed 65 bit integers without loss of precision.



More information about the Python-list mailing list