[fpc-devel] wrong result for abs(low(int64))
Bart
bartjunk64 at gmail.com
Thu Apr 4 23:40:06 CEST 2024
On Thu, Apr 4, 2024 at 9:49 PM Martin Frb via fpc-devel
<fpc-devel at lists.freepascal.org> wrote:
> The below writes: -9223372036854775808
>
> Shouldn't absolute return a positive number?
>
> program Project1;
> begin
> writeln( abs(low(int64)) );
> end.
See https://gitlab.com/freepascal.org/fpc/source/-/issues/40694
There were several commits about Abs w.r.t. this bug lately.
--
Bart
More information about the fpc-devel
mailing list