Re[4]: [fpc-devel] format function

Daniël Mantione daniel.mantione at freepascal.org
Thu Oct 12 16:36:10 CEST 2006



Op Thu, 12 Oct 2006, schreef ???? ???????????:

> > representable in an exact way on any IEEE standard-compliant fpu. The  
> 
> Of course. But the result of "format" is user-oriented. User is not supposed to know about negative zero, denormal numbers, negative infinity and the whole IEEE 754.
> 
> If the user is supposed to understand that "-0.000" means "a small negative number", then it's ok. If the user will be terrified, it would be bad.

Grandma is not the only user of a computer. A computer is a precision 
instrument, usable by scientists. Format is used to display numbers in 
scientific notation.

 0 means "somewhere between 0 and 2^-127".
-0 means "somewhere between -2^-127 and 0".

The difference is of scientific meaning. If there were no negative zero, 
the precision around zero would be halved.

Daniël


More information about the fpc-devel mailing list