On Sun, May 13, 2018 at 3:40 PM, Jonas Maebe <jo...@freepascal.org> wrote:
> The only proper way is to use something like Math.SameValue(x, int(x)).

B.t.w. the test suite for the new Int() function (win64)
(https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/tests/tbs/tb0644.pp?view=markup)
uses

47 function SameValue(aGot, aExpected: Double): Boolean;
48 begin
49 if IsNan(aExpected) then
50 Result := IsNan(aGot)
51 else
52 Result := aGot = aExpected;
53 end;

Bart
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to