[Numpy-discussion] What does float64 mean on a 32-bit machine?

Christopher Barker Chris.Barker@noaa....
Wed Mar 24 17:49:52 CDT 2010


reckoner wrote:
> How can I have a float64 dtype on a 32-bit machine? For example:

float64 is known as "double" in C, just for this reason.

Modern FPUs use 64 bit (actually more bits), so you can get very good 
performance with float64 on 32 bit machines.

And it is the standard Python float as well.


-Chris



> 
> In [90]: x = array([1/3],dtype=float32)
> 
> In [91]: x
> Out[91]: array([ 0.33333334], dtype=float32)
> 
> In [92]: x = array([1/3],dtype=float64)
> 
> In [93]: x
> Out[93]: array([ 0.33333333])
> 
> Obviously, the float32 and float64 representations of 1/3 are different, 
> but what is the meaning of float64 on a 32-bit machine? Shouldn't a 
> 32-bit machine only be able represent float32?
> 
> Thanks!
> 
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker@noaa.gov


More information about the NumPy-Discussion mailing list