问题描述
C中的数据类型是否比双(64位)的数据类型更好?
或旧的长双(80位)?
我'我想在我的数学应用程序中添加精度,但是我无法想象
如何。
非常感谢。
Is there a bigger, mathematical, data type in C than the double (64 bit) one
or the old long double (80 bit)?
I''d like to add precision to my mathematical application, but I can''t figure
out how.
Thanks alot.
推荐答案
一个int可以想象是128位,但如果你的机器有128位的操作,那么128位整数类型很可能很长。
Gordon L .Burditt
An int could conceivably be 128 bits, although if your machine has
128-bit operations, the 128-bit integer type is more likely long long.
Gordon L. Burditt
C双打不保证是64比特。
long double不保证是80位,为什么它是* OLD *
长的双倍?
你有浮点硬件使用超过80位
代表一个数字?
C doubles are not guaranteed to be 64 bits.
long double is not guaranteed to be 80 bits, and why is it the *OLD*
long double?
Do you have floating-point hardware that uses more than 80 bits
to represent a number?
一个int可以想象是128位,但如果你的机器有128位操作,128位整数类型更可能很长。
Gordon L. Burditt
An int could conceivably be 128 bits, although if your machine has
128-bit operations, the 128-bit integer type is more likely long long.
Gordon L. Burditt
我的机器是使用Windowsme的p4 pc;
我想在结果示例中添加小数而不是
17位小数30或40.
My machine is a p4 pc using Windowsme;
I would like to add decimals to my results example instead of
17 decimals 30 or 40.
C双打是不保证是64位。
long double不保证是80位,为什么它是* OLD *
长的双倍?
你有浮点吗?使用超过80位的硬件代表一个数字?
C doubles are not guaranteed to be 64 bits.
long double is not guaranteed to be 80 bits, and why is it the *OLD*
long double?
Do you have floating-point hardware that uses more than 80 bits
to represent a number?
一个int可以想象是128位,但如果你的机器有128位操作,128-比特整数类型更可能很长。
Gordon L. Burditt
An int could conceivably be 128 bits, although if your machine has
128-bit operations, the 128-bit integer type is more likely long long.
Gordon L. Burditt
我的机器是使用Windowsme的p4 pc;
我想将小数添加到我的结果示例中而不是o f
17位小数30或40。
My machine is a p4 pc using Windowsme;
I would like to add decimals to my results example instead of
17 decimals 30 or 40.
这是100-133个有效位数。 H /格式数字
VAX可以接近低端(我不记得只是
它的128位中有多少是指数),但我''我不知道
任何使用H格式的C编译器。
但是,最大的问题是为什么你想要这么多? />
位数?您可以在小数点后四十位分配一个加号或者减号
的一个波动是什么意思?如果你想要计算Angstrom中的宇宙半径
单位,那么四十个地方远远超过你的需要。
-
Er ********* @ sun.com
That''s 100-133 significand bits. H-format numbers on
the VAX could approach the lower end (I don''t recall just
how many of its 128 bits were exponent), but I''m not aware
of any C compiler that made use of H-format.
The big question, though, is why do you want so many
digits? What meaning could you assign to a plus-or-minus
one fluctuation in the fortieth decimal place? If you''re
trying to calculate the radius of the Universe in Angstrom
units, forty places are far more than you need.
--
Er*********@sun.com
这篇关于c中是否有比双倍更大的数据类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!