[fpc-devel] Currency * Double
    Virgo Pärna 
    virgo.parna at mail.ee
       
    Fri Oct 22 09:37:20 CEST 2021
    
    
  
On Fri, 22 Oct 2021 08:42:57 +0200, LacaK via fpc-devel <fpc-devel at 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.parna at mail.ee
    
    
More information about the fpc-devel
mailing list