Currency multiply by constant (divisible by 10000) on Win64
Original Reporter info from Mantis: lacak @lacak.sk
-
Reporter name: LacaK
Original Reporter info from Mantis: lacak @lacak.sk
- Reporter name: LacaK
Description:
There was implemented fix in rev. 38555 and folloved rev. 38558 - "scale constants if possible before currency multiplications to avoid overflows"
(if there is on left or right side of multiplication constant divisible by 10000)
But actualy there is in TRUNK again something wrong. See "Steps To Reproduce".
Steps to reproduce:
// OS: Win64, CPU: x86_64
var
c: currency;
begin
c:=922337203685.47;
writeln(c:18:4,' = ', ' Trunc(c*10000)=', Trunc(c*10000)); // expected 9223372036854700, but get -75
c:=-92233720368547;
writeln(c:18:4,' = ', ' Trunc(c*10000)=', Trunc(c*10000)); // expected -922337203685470000, but get 7580
end.
Additional information:
On Win32 there are results as expected.