Using round function I implemented the RoundTo function as in Delphi:
type
TRoundToRange = -37..37;
function RoundTo(const AValue: Double; const ADigit: TRoundToRange): Double;
var
LFactor: Double;
begin
LFactor := IntPower(10, ADigit);
Result := Round(AValue / LFactor) * LFactor;
end;
In D
A week or two ago, I also found a problem with the Banker's Rounding
in Free Pascal. As far as I could see, with my tests I did, compared
to Delphi an know results with set values, there is a bug in FPC
implementation.
I might have forgotten to report it in Mantis though. I will double check.
R
Dear The Free Pascal Developers
Greetings from Perú!
First and foremost, I would like to thank you for the great work you have
done and are currently doing in providing the world with a great compiler
for the Pascal programming language: Free Pascal.
I am writing to you concerning an issue that I
On 05/23/2019 09:28 PM, Juan Carlos Díaz Vigo wrote:
> I am writing to you concerning an issue that I consider as being of the
> greatest importance since it affects two compiler modes of the Free
> Pascal Compiler. The round function in FPC (version 3.0.4) when the
> parameter is equidistant from
Op 2019-05-25 om 14:54 schreef Ewald:
I am writing to you concerning an issue that I consider as being of the
greatest importance since it affects two compiler modes of the Free
Pascal Compiler. The round function in FPC (version 3.0.4) when the
parameter is equidistant from the two nearest in