Dear all,
a small algorithm to find out the machine accuracy of the programmable calculator and comparison with DM42, HP50G, HP48G, TI95, TI59
https://technical.swissmicros.com/doc/pdf/eps.pdf
ATTENTION correct PDF file 09/21/2020
Best Regards,
Enrico
Machine accuracy

 Posts: 9
 Joined: Wed Jun 10, 2020 11:56 pm
 Location: Italy
Machine accuracy
 Attachments

 epsopt.raw
 (59 Bytes) Downloaded 39 times

 eps.raw
 (82 Bytes) Downloaded 38 times
Last edited by hpsoftek65 on Sat Oct 03, 2020 2:39 am, edited 2 times in total.
Re: Machine accuracy
The article says that EPS is "the smallest machine value that can be added to 1.0 that gives a result distinguishable from 1.0". However, the photo of the HP 50g shows an EPS of 7.275957614E12. But smaller values work too, e.g. 1.0 + 6E12 > 1.00000000001
It seems to me that EPS for the HP 50g is 5.00000000001E12.
Does this article incorrectly assume that the HP 50g and other BCD calculators use IEEE binary floating point?
Disclaimer: If I misunderstood the article, please correct me.
It seems to me that EPS for the HP 50g is 5.00000000001E12.
Does this article incorrectly assume that the HP 50g and other BCD calculators use IEEE binary floating point?
Disclaimer: If I misunderstood the article, please correct me.

 Posts: 9
 Joined: Wed Jun 10, 2020 11:56 pm
 Location: Italy
Re: Machine accuracy
Dear Joe,
I apologize to everyone and in particular to Joe I was hasty and I did not check, I thought that the calculators HP50G, HP48G, TI95 and TI59 encoded numbers in base 2 instead of base 10, now I have done it and the results are correct. Over the weekend I correct the PDF file and have it updated on the site.
For HP50G 1+10E121 = 10E12
1+5E121 = 0
Best Regards,
Enrico
I apologize to everyone and in particular to Joe I was hasty and I did not check, I thought that the calculators HP50G, HP48G, TI95 and TI59 encoded numbers in base 2 instead of base 10, now I have done it and the results are correct. Over the weekend I correct the PDF file and have it updated on the site.
For HP50G 1+10E121 = 10E12
1+5E121 = 0
Best Regards,
Enrico
Re: Machine accuracy
If 10E12 were the EPS for the HP 50g, then 10E12 would be "the smallest machine value that can be added to 1.0 that gives a result distinguishable from 1.0" (the definition of EPS given in the linked PDF). But it's not the smallest. For example, 9E12 is smaller than 10E12, but 1+(9E12)1 is not equal to zero. Ditto for 8E12. And so on, all the way down to 5.00000000001E12 (the trailing digits are significant!), but nothing smaller, which makes 5.00000000001E12 the EPS for the HP 50g (as stated in my previous reply).
Re: Machine accuracy
In the wikipedia article it says that outside of academia, machine epsilon is defined as the difference between 1.0 and the next higher floating point number. I think that is actually what hpsoftek65's algorithm is trying to determine, whereas "the smallest machine value that can be added to 1.0 that gives a result distinguishable from 1.0" is more commonly known as the "unit roundoff" assuming roundtonearest mode.Joe Horn wrote: ↑Sat Sep 19, 2020 6:16 amIf 10E12 were the EPS for the HP 50g, then 10E12 would be "the smallest machine value that can be added to 1.0 that gives a result distinguishable from 1.0" (the definition of EPS given in the linked PDF). But it's not the smallest. For example, 9E12 is smaller than 10E12, but 1+(9E12)1 is not equal to zero. Ditto for 8E12. And so on, all the way down to 5.00000000001E12 (the trailing digits are significant!), but nothing smaller, which makes 5.00000000001E12 the EPS for the HP 50g (as stated in my previous reply).