[fpc-devel] Currency bug and FPC 3.2.0
LacaK
lacak at zoznam.sk
Fri Oct 11 11:46:48 CEST 2019
> On Fri, Oct 11, 2019 at 7:29 AM LacaK <lacak at zoznam.sk> wrote:
>> var
>> c: currency;
>> begin
>> c:=922337203685.47;
>> writeln(c:18:4,' = ', ' Trunc(c*10000)=', Trunc(c*10000));
>> c:=-92233720368547;
>> writeln(c:18:4,' = ', ' Trunc(c*10000)=', Trunc(c*10000));
>> end.
> 3.0.4 win32
> 922337203685.4700 = Trunc(c*10000)=9223372036854700
> -92233720368547.0000 = Trunc(c*10000)=-922337203685470000
>
> 3.3.1 r42348 win32
> 922337203685.4700 = Trunc(c*10000)=9223372036854700
> -92233720368547.0000 = Trunc(c*10000)=-922337203685470000
>
>
> 3.0.4 win64
> C:\Users\Bart\LazarusProjecten\ConsoleProjecten>test
> 922337203685.4700 = Trunc(c*10000)=-75
> -92233720368547.0000 = Trunc(c*10000)=7580
>
> 3.3.1 r42348 win64
> 922337203685.4700 = Trunc(c*10000)=-75
> -92233720368547.0000 = Trunc(c*10000)=7580
Thanks for confirming it!
Then seems that bug reported here
https://bugs.freepascal.org/view.php?id=33439 and in related reports is
back again?
-Laco.
More information about the fpc-devel
mailing list