Am 27.09.20 um 20:57 schrieb denisgolovan via fpc-devel:
Am 27.09.20 um 18:21 schrieb Florian Klämpfl via fpc-devel:
So we would need softfloat extended support. This is doable with one
major obstacle: the "irrational" functions like ld, sin etc.: they need
precise enough implementations for 80 bit (actually, just adding and
using in the compiler 128 bit softfloat support would be even better).
And this is probably something which is really hard. While I believe ;)
I can solve most coding challenges, this is something I fear to touch :)

Well. Intel arch supports FMA instruction sets since 2013 (Intel) and since 
2012 (AMD).
See https://en.wikipedia.org/wiki/FMA_instruction_set

FPC supports for years (since 2014?) FMA intrinsic on CPUs having them.


Based on FMA support it's quite easy to create 128 bits (almost) semi-soft 
floats.

This is a half-backen solution imo. For the compiler IEEE compliant 128 bit floats are a must.

Julia guys have a nice library called DoubleFloats 
(https://github.com/JuliaMath/DoubleFloats.jl, MIT licensed)

We cannot use MIT licensed code in the rtl.

They have a lot of trigonometric and other "complex" stuff already implemented.

So, maybe it's not that frightening after all :)

See above. It perfectly shows why it is frightening (not the basic stuff, but the transcendent functions):
- there are little libraries being really IEEE compliant for float128
- if they are IEEE compliant, their license does not allow to use the code in the FPC rtl.

See my own small port attached. Russian comments ahead so beware :)

-- Regards,
Denis Golovan


_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to