<p>Am 10.03.2016 13:01 schrieb "Michael Van Canneyt" <<a href="mailto:michael@freepascal.org">michael@freepascal.org</a>>:<br>
><br>
><br>
><br>
> On Thu, 10 Mar 2016, Yury Sidorov wrote:<br>
><br>
>> On 3/10/2016 11:33 AM, Michael Van Canneyt wrote:<br>
>>><br>
>>><br>
>>> On Thu, 10 Mar 2016, LacaK wrote:<br>
>>><br>
>>>> Hi,<br>
>>>> investigating bug #29760 I reduced bug to:<br>
>>>><br>
>>>> var<br>
>>>> c: currency;<br>
>>>> d: double;<br>
>>>><br>
>>>> begin<br>
>>>> c := 123.45;<br>
>>>> d := 100;<br>
>>>> writeln(c, '*', d, '=', c*d); // result of multiply is wrong = 123450000<br>
>>>> end.<br>
>>>><br>
>>>> This happens only on Win64 with FPC 3.0<br>
>>>><br>
>>>> Can somebody please check and confirm ?<br>
>>><br>
>>><br>
>>> If confirmed, then I think this is enough reason to start a 3.0.2<br>
>>> release :/<br>
>><br>
>><br>
>> I've fixed similar issue for ARM several months ago.<br>
>> <a href="http://bugs.freepascal.org/view.php?id=28748">http://bugs.freepascal.org/view.php?id=28748</a><br>
>> But the bug possibly had affected all 64-bit integer currency targets.<br>
>><br>
>> Does the bug exist in trunk?<br>
><br>
><br>
> It really depends on the platform.<br>
><br>
> Linux, 64-bit prints with trunk:<br>
><br>
> 1.234500000000000000E+02* 1.0000000000000000E+002= 1.234500000000000000E+04<br>
><br>
> And it prints the same with 3.0.0.</p>
<p>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).</p>
<p>Regards,<br>
Sven</p>