s*******r 发帖数: 5 | 1 how to achieives (x==1.0) without using FPT unit?
thanks |
a******t 发帖数: 100 | 2 If x is in IEEE standard format.
and if x is a *small* integer (which is true for 1.0),
x has the same format for integer and FP.
【在 s*******r 的大作中提到】 : how to achieives (x==1.0) without using FPT unit? : thanks
|
s*****e 发帖数: 21415 | 3 faint... 别误人子弟。
double 是64位,ing/long 一般是32位,能一样吗?
【在 a******t 的大作中提到】 : If x is in IEEE standard format. : and if x is a *small* integer (which is true for 1.0), : x has the same format for integer and FP.
|
s*******r 发帖数: 5 | 4 this depends on processor. But I think amethyst's solution works in principle.
【在 s*****e 的大作中提到】 : faint... 别误人子弟。 : double 是64位,ing/long 一般是32位,能一样吗?
|
s*****e 发帖数: 21415 | 5 还是老实点研究一下浮点的格式吧。
【在 s*******r 的大作中提到】 : this depends on processor. But I think amethyst's solution works in principle.
|
z*****n 发帖数: 7639 | 6 doesn't ((int)x==1.0) work?
or you have to inspect bitwisely of the float?
【在 s*******r 的大作中提到】 : how to achieives (x==1.0) without using FPT unit? : thanks
|