FormatFloat() returns wrong results
Original Reporter info from Mantis: andishock
-
Reporter name: Andreas
Original Reporter info from Mantis: andishock
- Reporter name: Andreas
Description:
In some cases (at least two) formatfloat returns wrong results,
For input of 1.05e2 and 1.06e2 it returns '..050E+002' and '..060E+002', respectively. In all other cases I tried, the results were ok.
Steps to reproduce:
Try the following simple test program for the cases 1.05e2 and 1.06e2:
program testformatfloat;
uses sysutils;
const
val_format: string = '0.0000E+000';
var
input: extended;
begin
decimalseparator:='.';
write('Float: ');
readln(input);
writeln('Output of formatfloat: '+formatfloat(val_format,input));
end.
Mantis conversion info:
- Mantis ID: 15308
- OS: Windows
- OS Build: XP
- Platform: i386
- Version: 2.2.4
- Fixed in version: 2.4.2
- Fixed in revision: 15201 (#78e19bdd)
- Monitored by: » andishock (Andreas)
- Target version: 2.4.2