|Re: Converting a decimal # to a fraction #|
Message #10 Posted by Xose on 15 Apr 2000, 2:10 p.m.,
in response to message #9 by Erwin
I've translated the HP42S 'Fract' code to a HP41C and it works, though is not as user-friendly as on the HP42S. You can find both HP42S and HP41C programs here:
I've included the 42S code because it's output is nicer (it even shows you if the fraction is 'equal to', 'less than' or 'greater than' the original decimal number, more or less the same way the HP32SII does), but you would need the Extended Functions Module or a HP41CX to use it.
To use it on the 41C series:
X: %decimal_number -> Y: %numerator X: %denominator
Y: %decimal_number X: %precission -> Y: %numerator X: %denominator
the default precission is the number at the forth step (12). The code can be improved, I'm sure. If you find any mistake or do any improvement, please, let me know.