[fpc-devel] wrong result for abs(low(int64))

Martin Frb lazarus at mfriebe.de
Thu Apr 4 15:14:38 CEST 2024


The below writes:  -9223372036854775808

Shouldn't absolute return a positive number?

program Project1;
begin
   writeln( abs(low(int64)) );
end.



Seems
writeln( abs(low(longint)) );

also returns negative...



More information about the fpc-devel mailing list