On Fri, 22 Oct 2021 08:42:57 +0200, LacaK via fpc-devel 
<fpc-devel@lists.freepascal.org> wrote:
> Hi ,
> what data type is result of multiplication of: (Currency * Double) on 
> Win64 (and on Win32)?
>    c:=1115;
>    d:=100000000;
>    writeln(Round(c*d)); // gives -72967440737

        32 bit version gives always 111500000000 as a result (and
floating point math should always have extended precision intermeiate
there) . But even with double intermediate result on 64 bit versions 
there should not be any problems. 1.1150000000000000E+011 is well in 
range of that type.


-- 
Virgo Pärna 
virgo.pa...@mail.ee

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to