float / double support in Python?
Terry Reedy
tjreedy at udel.edu
Thu Feb 6 17:49:26 EST 2003
"Brandon Van Every" <vanevery at 3DProgrammer.com> wrote in message
news:4fB0a.2838$tO2.315014 at newsread1.prod.itd.earthlink.net...
> float and double support is very critical to ease-of-use for my 3D
graphics
> programming work. How does Python fare for number crunching? I'm
not so
If you use Numerical Python, which, among other things, wraps at least
some of the C functions from BLAS, LINPACK, and FFTPACK, pretty well.
I believe arrays can be either C float or double.
> much concerned with efficiency, I'm not expecting much, but rather
syntax,
> universality of support on different platforms, or other headaches /
> gotchas. For instance it's not acceptable to represent a float
/double as a
> string, it has to be 4 bytes / 8 bytes.
Python proper only uses 'floats' which (for CPython) are 8 byte C
doubles.
> I heard at one point that people
> were considering abolishing floating point support from the
language?
Nope. Some specialized versions for embedded systems leave them out
for compactness.
Terry J. Reedy
More information about the Python-list
mailing list