Re: [fpc-pascal] Loss of precision when using math.Max()

2018-07-13 Thread Sven Barth via fpc-pascal
Martok  schrieb am Fr., 13. Juli 2018, 16:37:

> The other links were about intermediates of runtime calculations, so this
> change
> is correct:
> > I have added support for the directive $EXCESSPRECISION: it forces that
> all binary float operations are executed with
> > the highest available precision available for the currently selected FPU
> On that commit, am I blind or is this the same expression twice?
> <
> https://github.com/graemeg/freepascal/blob/340c0b3b/compiler/nadd.pas#L159
> >
>

That was this way already before that commit, but you're right that it
should be "t1" in one of the two. ;)

Regards,
Sven

>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Loss of precision when using math.Max()

2018-07-13 Thread Martok
Am 12.07.2018 um 23:38 schrieb Florian Klämpfl:
> This will result in different results for runtime and compile time calculated 
> expressions => bad idea.

Aye, doing the same at runtime and compile time would be the sane idea.

Still, the Delphi(32) compiler always works with Extended precision at compile
time. See
:
"If constantExpression is a real, its type is Extended" - that type then 
propagates.
So Real literal minimisation (Jonas' original change only exposed it) is another
one for the portability notes.


Speaking of which, who is admin for the wiki (I couldn't find any contact
information)? It would be really useful to have the "Cite" extension available.
It should be bundled, just needs to be enabled.


The other links were about intermediates of runtime calculations, so this change
is correct:
> I have added support for the directive $EXCESSPRECISION: it forces that all 
> binary float operations are executed with 
> the highest available precision available for the currently selected FPU
On that commit, am I blind or is this the same expression twice?



-- 
Regards,
Martok

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal