function round return wrong values
Original Reporter info from Mantis: m99999
-
Reporter name: Gerhard Müllner
Description:
round function returns wrong values in some cases
e.g. round(1.5) -> returns 2
round(2.5) -> returns 2 not 3
round(3.5) -> returns 4
round(4.5) -> returns 4 not 5
Steps to reproduce:
program RoundTest;
begin
{$IFDEF VIRTUALPASCAL} writeln('VIRTUALPASCAL:'); {$ENDIF}
{$IFDEF FPC} writeln('FREEPASCAL:'); {$ENDIF}
{$IFDEF __BP__} writeln('BORLANDPASCAL:'); {$ENDIF}
writeln('round(1.5):',round(1.5));
writeln('round(2.5):',round(2.5));
writeln('round(3.5):',round(3.5));
writeln('round(4.5):',round(4.5));
end.
Mantis conversion info:
-
Mantis ID: 31644
-
OS: Windows & OpenSuse
-
OS Build: 10 & 42,1
-
Build: 3.0.2! not selectable
-
Platform: Windows & Linux
-
Version: 3.0.1
-
Monitored by: » m99999 (Gerhard Müllner)