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

Пётр Косаревский ppkk at mail.ru
Thu Oct 12 15:41:58 CEST 2006


> >> Not only that, but -0.000 is different from 0.000 (at least for the fpu)
> >> Jonas
> > In a mathematical way of view I think that -0.000 has no meaning.
> Well, despite the fact that -0.000 is probably indeed wrong in this case, a
> mathematical view is often wrong when using an fpu :)
> > If I round something and the resulting value is zero, well zero is zero.
> > Not +0 or -0.
> > a.

It's a matter of tradition. If FPC is to behave like Delphi, the "question" is definitely a bug report.

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". And user may understand, that multiplying it by 10000 he is not likely to get positive number. And it has nothing in common with FPU plus/minus zeroes in the example.

I personally prefer "-0.000" in this case.



More information about the fpc-devel mailing list