The Museum of HP Calculators

HP Forum Archive 09

[ Return to Index | Top of Index ]

Re: machine epsilon
Message #1 Posted by Pascal on 11 Oct 2002, 8:08 a.m.

Hi,

2^(-37) is 7.3E-12, and 2^(-30) is 9.3E-10. Which makes sense, because the 42S has a 12 digits mantissa and the 41 has got 10. Your program however is based on the assumption that the machine under test is using a 2's complement mantissa, which is not the case for the HP calcs except maybe the 71 and the 30S (correct me if I'm wrong). They're BCD based, so the epsilon should be 1E-11 and 1E-9, respectively.

NB: The way to check this is to evaluate [(1+eps)-1 == eps]?, where eps is the number mentionned above.

So the next "challenge" would be to write a small program to detect whether your machine is BCD or 2's complement based :-)

Pascal


[ Return to Index | Top of Index ]

Go back to the main exhibit hall