Am 10.03.2016 13:01 schrieb "Michael Van Canneyt" <mich...@freepascal.org>: > > > > On Thu, 10 Mar 2016, Yury Sidorov wrote: > >> On 3/10/2016 11:33 AM, Michael Van Canneyt wrote: >>> >>> >>> On Thu, 10 Mar 2016, LacaK wrote: >>> >>>> Hi, >>>> investigating bug #29760 I reduced bug to: >>>> >>>> var >>>> c: currency; >>>> d: double; >>>> >>>> begin >>>> c := 123.45; >>>> d := 100; >>>> writeln(c, '*', d, '=', c*d); // result of multiply is wrong = 123450000 >>>> end. >>>> >>>> This happens only on Win64 with FPC 3.0 >>>> >>>> Can somebody please check and confirm ? >>> >>> >>> If confirmed, then I think this is enough reason to start a 3.0.2 >>> release :/ >> >> >> I've fixed similar issue for ARM several months ago. >> http://bugs.freepascal.org/view.php?id=28748 >> But the bug possibly had affected all 64-bit integer currency targets. >> >> Does the bug exist in trunk? > > > It really depends on the platform. > > Linux, 64-bit prints with trunk: > > 1.234500000000000000E+02* 1.0000000000000000E+002= 1.234500000000000000E+04 > > And it prints the same with 3.0.0.
It's probably more related to whether the system has Extended or not. On Linux x86_64 we use the FPU and thus the 80-bit floating point types, on Win64 we don't. Would be interesting to see the results on other platforms that don't have an 80-bit type (e.g. ARM). Regards, Sven
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel