32 bit or 64 bit?

Benjamin Kaplan benjamin.kaplan at case.edu
Sun Jun 15 08:19:33 EDT 2008


On Sun, Jun 15, 2008 at 8:02 AM, ram.rachum at gmail.com <ram.rachum at gmail.com>
wrote:

> On Jun 15, 2:48 pm, Peter Otten <__pete... at web.de> wrote:
> > ram.rac... at gmail.com wrote:
> > > Quick question:
> > > I have python code that does a lot of floating point arithmetic. How
> > > do I make it do the arithmetic in 64 bit? (I have a 64 bit CPU.) If
> > > I'll install a 64-bit operating system, will that do the trick?
> >
> > The Python float type uses a C double internally which is 64 bit even on
> 32
> > bit CPUs.
> >
> > Peter
>
> Does it mean that even now it does arithmetic in 64 bit?
> I'm not getting enough precision. Is there any way to increase it?
>

Use the decimal module rather than floats. Decimals let you specify the
precision you want to use.

>
> Ram.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080615/07e38f09/attachment-0001.html>


More information about the Python-list mailing list