Miro Kropacek wrote:
fdlibm or pml ? default from easymint, i.e. fdlibm I guess.
This is what I feared from a long time... the libm issues.Originally I used PML because I was not aware of fdlibm. As it seemed to be quite OK, I never made the effort to switch to fdlibm (yet).
When I made the objstack patch, I'm pretty sure all the tests had passed for 68000. I had compiled them with the cross-compiler and PML, then I ran them on ARAnyM through the hostfs.
I'm not sure, but I may have tried the 68020-60 version and there was failures... I don't remember well. However, I'm not sure if all the floating-point implementations are strictly equivalent, maybe there are some roundings approximations... However the gmp tests are certainly aware of that.
Some time ago I have compiled the latest POV-Ray for MiNT. I used my cross-gcc and PML, as usual. The 68000 and ColdFire version works perfectly (but PML sometimes print warnings on the screen !). The 68020-60 version produces images with very wrong colors.
POV-Ray and GMP are good examples because they heavily use the floating point functions.
Note there is a particularity on GCC for m68k. On 68000 and ColdFire, the floats are returned in d0 as usual. But on 68020+, they are returned in the FPU register fp0 ! If all the libraries are compiled with the same options and the same compiler, there is no problem. But this certainly a source of problems, and I'm sure it is the case for POV-Ray. However I have not yet investigated this issue. Note that this odd return value behaviour was here in GCC 2.95.3 for MiNT, and I kept it in GCC 4.x.
I don't know if all these problems are related.There are not so much functions in the libm, we should make some basic tests manually, then it would be good to find a testsuite.
About the math libraries, there is one in Newlib, however I don't know if it is as much optimized as fdlibm.
-- Vincent Rivière