[fpc-devel] format function
Jonas Maebe
jonas.maebe at elis.ugent.be
Thu Oct 12 15:46:23 CEST 2006
On 12 okt 2006, at 15:41, Пётр Косаревский wrote:
> In the othe case, if the user is supposed to understand, that he
> looks at some representation of binary representation of a real
> number, "-0.000" obviously means "little negative number".
No, it means the value 0, but with a negative sign. The value "-0" is
representable in an exact way on any IEEE standard-compliant fpu. The
reason is that fpu's have a separate bit to store the sign. So even
if the mantissa and exponent show that it's the value zero, the sign
bit can still be one (meaning that it's a negative zero). And for
some fpu calculations this even matters.
Jonas
More information about the fpc-devel
mailing list