[fpc-devel] Bug 29760 on FPC 3.0 Win64

Sven Barth pascaldragon at googlemail.com
Thu Mar 10 14:17:32 CET 2016


Am 10.03.2016 13:01 schrieb "Michael Van Canneyt" <michael at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20160310/1522552d/attachment.html>


More information about the fpc-devel mailing list