hp calculators
HP 50g Working with Fractions
hp calculators - 6 - HP 50g Working with Fractions
If ->QΠwill convert a real number to whichever is better, a fraction with PI, or without, there may seem to be no reason to use ->Q.
In fact, there are two good reasons to use ->Q. The first is to use it where PI is not expected in the answer, and if it does appear, this
is purely by chance, and is not wanted. The second is in calculations that specifically try to convert PI itself into a fraction, as will be
shown in the next example. Thus ->QΠshould be used if there is an expectation that PI might be a part of the answer. If PI is not
wanted in the answer, ->Q should be used.
In RPN mode ->Q and ->QΠconvert a value from Level 1 of the stack to a fraction, possibly multiplied by PI if ->QΠis used.
Accuracy, and an Example
Converting a fraction to a real number with …ï always gives the most accurate representation of the fraction that is possible
on the HP50g. ->Q and ->QΠwill calculate the simplest fraction that they can find which gives a value as accurate as that shown in
the present display mode. If the number of digits shown in the display is increased then ->Q and ->QΠwill try to achieve the greater
precision and will often give a result that uses a longer numerator and denominator. This can be seen if PI is converted to a fraction
in different display modes.
First, it is necessary to set FIX 2 mode, where only 2 digits are shown after the decimal point. Press the Hkey and then press the
down key ˜to reach the number format. Press Bbelow the !CHOOS menu label, then use the up or down key to select FIXED
mode, and press the Fkey below the %OK% menu label to accept the change. Press the right arrow ™to reach the selection
for the number of digits, and press Bbelow !CHOOS again, then use the up and down keys to pick 2, and press Fbelow %OK%
again. Press Fonce more to confirm the whole selection and to leave the Calculator Modes Form.
Now to convert PI to a fraction in FIX 2 mode, in Algebraic mode, press „ì…ï to see 3.14. Then press ~~
…éq„Ü~„î`.
This will show 22/7, the well-known approximation to PI. To try the same with more accuracy, repeat the above process for setting
FIX 2 mode, but choose FIX 5 mode instead. To convert PI to a fraction in FIX 5 mode, press the same keys as before,
„ì…ï to see 3.14159. Press ~~…éq„Ü~„î`.
Now this will show 355/113, a better approximation to PI.
Figure 13
In both cases, the most accurate value of PI possible was on the stack, only the display was rounded to fewer decimal places, but in
each case ->Q returned the simplest value that could be found to represent PI to the accuracy displayed.
Once all the examples have been completed it may be worth returning the calculator to its normal modes. It can also be helpful to
clear the stack by pressing …·.
Further Details
->Q and ->QΠwill work with complex numbers and with expressions containing several real numbers. They will convert each real
number into a fraction separately. Note: ->QΠwill also convert real numbers in vectors and matrices to fractions.
The only way to guarantee that PI will appear when a real number is factored into a rational is to divide by PI first, then use ->Q, not
->QΠ. This is because of the way ->QΠworks. Most of the time this is not an issue, but there are situations where this must be
done if PI must be in the result.