Some corrections, see below ...
Am 03.10.2018 um 11:54 schrieb Bernd Oppolzer:
The explanation for the results is as follows:
the first three codings do the multiplication first, then the division.
the last two first division, then multiplication. That makes the
difference.
When division
El 03/10/18 a las 10:40, mailingli...@geldenhuys.co.uk escribió:
I have this simple little test. My expected answer for all the
calculations are 0 (zero), but both FPC and Delphi give different
results. Java is the only one that seems consistent regarding the
results.
Can anybody explain
The explanation for the results is as follows:
the first three codings do the multiplication first, then the division.
the last two first division, then multiplication. That makes the
difference.
When division is done first, you get an intermediate result of 1.0 exactly.
The subsequent
Am 03.10.2018 um 11:28 schrieb mailingli...@geldenhuys.co.uk:
>
> graeme.geldenhuys@UKCM-L500737 C:\devel\tests\OperatorPrecedence
>> fpc -Criot TestOperatorPrecedence.pas
> Free Pascal Compiler version 3.0.2 [2017/02/13] for i386
> Copyright (c) 1993-2017 by Florian Klaempfl and others
> Target
Am 03.10.2018 um 12:06 schrieb Florian Klämpfl:
> really stored with extended precision representing exactly the
> value 51009.9.
This was sloopy wording by myself: the representation is not exact for extended
either, but it must be actually the best
possible presentation with extended
Am 03.10.2018 um 10:40 schrieb mailingli...@geldenhuys.co.uk:
> I have this simple little test. My expected answer for all the calculations
> are 0 (zero), but both FPC and Delphi give
> different results. Java is the only one that seems consistent regarding the
> results.
Compile/run on the
Hi Florian,
Thanks for your reply. Initially I had all the data types as Double in
the Object Pascal example. I then thought that maybe there is some auto
data-type conversion, and tried storing the result in a Extended type
instead. It made no difference.
From your example, the only time
I have this simple little test. My expected answer for all the
calculations are 0 (zero), but both FPC and Delphi give different
results. Java is the only one that seems consistent regarding the
results.
Can anybody explain this, especially the first 3 very small negative
numbers that Delphi