[fpc-devel] Incorrect/Strange precision in FloatToStr and FloatToStrF

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Jan 17 16:35:39 CET 2006

On 17 jan 2006, at 16:02, Graeme Geldenhuys wrote:

> Any idea how Delphi handles this differently then without rounding
> errors?  This behaviour was picked up in my unit tests I am porting
> from Delphi to FPC.

I think the reason is that FloatToStrF() is not overloaded for double  
and single, so even if you pass a double, it will be written out with  
extended precision (so you go past the maximum precision of the value  
and get rounding errors). Please submit a bug.


More information about the fpc-devel mailing list