when the statement

if (-0 = 0)

is true then RoundTo schould not return an numer like -0 ?!
i think the point of view of an fpu is in the round functions not nessesary 0 is 0 and not -0



----- Original Message ----- From: "Jonas Maebe" <[EMAIL PROTECTED]>
To: "FPC developers' list" <fpc-devel@lists.freepascal.org>
Sent: Thursday, October 12, 2006 3:46 PM
Subject: Re: Re[2]: [fpc-devel] format function



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_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to