18 digit precision floating point printing
Original Reporter info from Mantis: BeniBela @benibela
-
Reporter name: Benito van der Zander
Original Reporter info from Mantis: BeniBela @benibela
- Reporter name: Benito van der Zander
Description:
It should be possible to print an extended with 18 digits precision, since it can store respective values.
Currently something like
var b: extended;
begin
b := 999999999999999999;
writeln(b:25:25);
writeln(FloatToStrF(b, ffFixed, 25, 0));
end;
prints 1000000000000000000, although viewing the number in gdb shows the correct 999999999999999999- (Also 999999999999999999.1, 999999999999999999.2, to 999999999999999999.9 are all distinct values)
Procedure str_real in rtl\inc\real2str.inc limits the precision to 25-6-2=17 characters. ... Delphi help http://docwiki.embarcadero.com/Libraries/XE3/en/System.SysUtils.FloatToStrF specifies 18 characters ;)
(ludob)
Mantis conversion info:
- Mantis ID: 23196
- Version: 2.6.0
- Fixed in version: 3.0.0
- Fixed in revision: 25888 (#21eeec99)
- Monitored by: » Vincent (Vincent Snijders)