12-10-2001, 01:43 AM
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.