|Re: HP67/97 RND Function|
Message #6 Posted by Valentin Albillo on 26 Feb 2008, 6:54 p.m.,
in response to message #5 by Mike T.
Hi again, Mike:
"[...] except that I was assuming that the HP67 RND function matched the HP11C! "
But you asked about STO RAN and RCL RAN and only the HP-15C has both, the HP-11C can do the STO RAN part but is missing the RCL RAN (and of course, the HP-67 has neither).
Thus, it was only logical to assume you were referring to the HP-15C full implementation as you mentioned both functions, not one.
Also, if you plan to implement them in some simulator/emulator of yours not ROM based, be aware that in the HP-15C, STO RAN will accept any numeric argument but RCL RAN will 'normalize it' so that it's always recalled as a positive value between 0 (included) and 1 (not included), with possible truncation for small arguments. For instance:
0.5, STO RAN, RCL RAN -> 0.5 (intact)
PI, STO RAN, RCL RAN -> 0.3141592654 (scaled)
-314.1592654, STO RAN, RCL RAN -> 0.3141592654 (scaled, sign changed to positive)
3.141592654E-3, STO RAN, RCL RAN -> 0.0031415926 (truncated, 2 last places missing)
You must take that complicated behavior into account if you want your implementation to be able to run HP-15C programs like a physical unit would for compatibility purposes.
Best regards from V.
Edited: 26 Feb 2008, 7:05 p.m.