[fpc-devel] FormatFloat

darekm at emadar.com darekm at emadar.com
Wed Dec 30 17:27:03 CET 2009


>
> On 30 Dec 2009, at 16:20, darekm at emadar.com wrote:
>
>> I try to resolve http://bugs.freepascal.org/view.php?id=15308
>> problem is with str
>>  str(1.0:10,s); writeln(s);
>>  str(1.05:10,s);writeln(s);
>>  str(1.05e2,s);writeln(s);
>> give results (:
>>
>> 1.000E+00
>> 1.0E+0000
>>  1.050000000000000E+0002
>> ^^// moving
>>
>> where I can find implementation of str

this program:
var
  d1,d2 : double;
begin
  d1:=105;
  d2:=1.05e2;
  writeln(d1-d2);
end;

result: 6.9388939907E-18

is this bug?
what should be repair:
 formatfloat
 real_str
 constant assigment

Darek




More information about the fpc-devel mailing list