I looked into how the Prime? test works, and essentially it takes
the integer part of the X register IP(X) then tests that value for
primality. If instead it took the RND(X) before doing the primality test then numbers with tiny rounding errors would still
accurately indicate the expected primality.
For example if you take the number 79 and divide it by 3 then multiply it by 3, you get a number with a tiny rounding error
in the 16th digit. On the display (even fix 11, or all 11) it appears to be 79 exactly. If you display the whole number with
(f <) it shows 78.99999999999999.
So the primality test (h test prime?) clips it down to 78 and shows false. If the RND(X) were applied to the number prior to testing for
primality, then the result will always reflect the primality of the
number shown on the display. What do you think?
Edited: 20 Oct 2013, 3:06 p.m.