HP Forums

Full Version: Fractions on the HP-32SII
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Does anyone know how fractions are implemented on the HP-32SII (and related HP calculators)? More specifically, given a 0 < z < 1, how do they determine the ratio x/y that is closest to z with a denominator between 1 and 4095 (the max settable on the 32SII)? For example, for z = 0.1763, x/y = 61/346, and for 1/PI, x/y = 113/355. I assume there is something more efficient than an exhaustive search. More generally, is there any reference that describes the numerical algorithms used in HP calculators? Thanks.

>Does anyone know how fractions are implemented on the HP->32SII (and related HP calculators)? More specifically, [...]
>exhaustive search. More generally, is there any reference >that describes the numerical algorithms used in HP >calculators? Thanks.

I guess it is the Continued Fractions algorithm.
For a quick reference you can check
www.ulib.org\webRoot\Books\Numerical_Recipes\bookcpdf.html
(Chapter 5 Evaluation of Functions, Paragraph 5.2 Evaluation of Continued Fractions 169).
which explains the algorithm along whith many others...