[fpc-pascal] Floating point miscalculations on PowerPC

Tobias Giesen tobias_subscriber at tgtools.com
Sat Mar 13 12:30:45 CET 2010


Hello,

I'm using FPC 2.2.4 (ppcppc) to create a PowerPC app with Lazarus. It's
running under Rosetta on an Intel Mac.

Simple floating point operations like this result in wrong code that
creates wrong results:

-------------------
var it:Int64;
    dt:TDateTime
begin
  it:=ANumber;
  dt:Trunc(it/10.0+0.5) / 86400.0;
end;
-------------------

Does anybody remember a bug with TDateTime calculations and floating
point constants that would only occur on the PowerPC platform? Has
it been fixed?

Cheers,
Tobias





More information about the fpc-pascal mailing list