On 07.02.2019 19:22, Martok wrote:
Is this a known bug?
(Btw. I tested on win32.)
Maybe this?
https://bugs.freepascal.org/view.php?id=33963
Yes, it looks like the same issue. Thanks for pointing me there!
Ondrej
___
fpc-devel maillist -
> Is this a known bug?
>
> (Btw. I tested on win32.)
Maybe this?
https://bugs.freepascal.org/view.php?id=33963
--
Regards,
Martok
___
fpc-devel maillist - fpc-devel@lists.freepascal.org
More info: if I use an Integer variable or even an Integer constant the
results are correct:
program Project1;
var
C0, C1, C2, C3, C4: Currency;
D0: Double;
I0: Integer;
begin
I0 := 4736;
C0 := I0;
D0 := C0;
C1 := C0 * 8 / 72 * 25.4 / 2048;
C2 := D0 * 8 / 72 * 25.4 / 2048;
C3
Hello,
when doing floating point calculations with Currency, the results are wrong.
Example:
program Project1;
var
C0, C1, C2: Currency;
D0: Double;
begin
C0 := 4736;
D0 := C0;
C1 := C0 * 8 / 72 * 25.4 / 2048;
C2 := D0 * 8 / 72 * 25.4 / 2048;
Writeln(C1);
Writeln(C2);
end.
FPC