32位还是64位? [英] 32 bit or 64 bit?

查看:90
本文介绍了32位还是64位?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

快速提问:

我有python代码执行大量浮点运算。

如何让它在64位中进行算术运算? (我有一个64位CPU。)如果

我会安装一个64位操作系统,那会不会这样做?

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?

推荐答案

ra********@gmail.com 写道:
ra********@gmail.com wrote:

快速提问:

我有python代码执行大量浮点运算。

如何让它在64位中进行算术运算? (我有64位CPU。)如果

我会安装一个64位操作系统,这会有什么作用吗?
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?



Python浮点类型在内部使用C double,即使在32位
位CPU上也是64位。

Peter

The Python float type uses a C double internally which is 64 bit even on 32
bit CPUs.

Peter


6月15日下午2:48 *,Peter Otten< __ pete ... @ web.dewrote:
On Jun 15, 2:48*pm, Peter Otten <__pete...@web.dewrote:

ram.rac ... @ gmail.com写道:
ram.rac...@gmail.com wrote:

快速提问:

我有python代码执行大量的浮点运算。

如何让它在64位中进行算术运算? (我有64位CPU。)如果

我会安装一个64位操作系统,这会有什么作用吗?
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?



Python float类型在内部使用C double,即使在32

位CPU上也是64位。

Peter


The Python float type uses a C double internally which is 64 bit even on 32
bit CPUs.

Peter



这是否意味着即使现在它也是64位算术?

我没有得到足够的精确。有没有办法增加它?


Ram。

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?

Ram.


ra ******** @ gmail.com 写道:
ra********@gmail.com wrote:

6月15日,2: 48?* pm,Peter Otten< __ pete ... @ web.dewrote:
On Jun 15, 2:48?*pm, Peter Otten <__pete...@web.dewrote:

> ram.rac ... @ gmail.com写道:
>ram.rac...@gmail.com wrote:

快速提问:

我有python代码执行大量浮点运算。

如何让它在64位中进行算术运算? (我有64位CPU。)如果

我会安装一个64位操作系统,这会有什么作用吗?
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?


Python float类型在内部使用C double,即使在32位CPU上也是64位。

Peter


The Python float type uses a C double internally which is 64 bit even on
32 bit CPUs.

Peter



这是否意味着即使现在它在64位运算?


Does it mean that even now it does arithmetic in 64 bit?



是的。见

http:// en .wikipedia.org / wiki / IEEE_fl ... ecision_64_bit


了解详情。

Yes. See

http://en.wikipedia.org/wiki/IEEE_fl...ecision_64_bit

for details.


我''没有足够的精确度。有没有办法增加它?
I''m not getting enough precision. Is there any way to increase it?

http://gmpy.sourceforge.net/


如果按不够精确的话你的意思是你被

http://gmpy.sourceforge.net/

If by "not enough precision" you mean you are bothered by


>> .1
>>.1



0.10000000000000001


查看十进制模块,参见

http://docs.python.org/lib/module-decimal.html


彼得

0.10000000000000001

have a look at the decimal module, see

http://docs.python.org/lib/module-decimal.html

Peter


这篇关于32位还是64位?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆