Thread: FPU glitches
View Single Post
Old 13 September 2021, 23:50   #28
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,374
The 64 bit host cannot be perfect, because some calculations depend on the Microsoft compiler.

@Thomas Richter

I made some tests with one of the examples for double rounding from your link above. All Mathlibs that I tested returned the same results.

But I didn't test the other examples yet. Am I doing something wrong in my test code? Try it out.


Update: Yes, the second example (t=s+y) produces indeed a double rounding issue with my mathlibs, but not with the OS mathlibs.

It seems to be exactly the constellation that I already described some years ago in our A1k.org discussion. The results of these special cases are never accurate anyway and the error is only 50% of the least significant bit of huge numbers, nearly the same amount as with the OS mathlibs, but just rounded up, not down.

It already rounds up instead of down, but only at the highest fragment bit sequence where rounding down is still possible and expected. The additional relative error is very low and this sort of double rounding happens quite rarely, so I won't care, because it has more disadvantages to use Double Precision all the time than getting these double rounding errors.
Attached Files
File Type: zip TestDoubleRounding.zip (2.5 KB, 51 views)
File Type: lha TestDoubleRounding2.lha (1.8 KB, 40 views)

Last edited by PeterK; 15 September 2021 at 16:01.
PeterK is offline  
 
Page generated in 0.04683 seconds with 12 queries