HP Forums
( Free42 ) Arithmetic with Fractions - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: General Software Library (/forum-13.html)
+--- Thread: ( Free42 ) Arithmetic with Fractions (/thread-15168.html)



( Free42 ) Arithmetic with Fractions - Gamo - 06-10-2020 05:27 AM

Program to add, subtract, multiply, divide, simplify to lowest term and
convert to mixed fraction.

-------------------------------------------------------------

The program code is from my previous post for the HP-11C and

program is adapted from member who enhance this program further.

His program is on Post: #2

https://www.hpmuseum.org/forum/thread-11400.html

Remark: Post: #3 was mention about very large fractions that

the normal 11C can't give out correct answer but with the

Free42 or DM42 that came with larger decimal precision I

try that problem and very easily gave result fast and accurate answer.

--------------------------------------------------------------
Assign Soft Menu keys as shown below:

[ADD] [SUBT] [MULTI] [DIV] [MIX] [AF]

-------------------------------------------------------------

To run program:

Initilize menu button to [AF] display "Arithmetic Fractions"

-------------------------------------------------------------

Usage:
Calculate a/b [+ – x ÷] c/d

a [ENTER] b [ENTER] c ENTER d

[ADD] => add
[SUBT] => subtract
[MULTI] => multiply
[DIV] => divide

[MIX] => convert to mixed fraction

The result of each operation is in Y (numerator) and X (denominator).
Even after a mixed fraction has been displayed the simple fraction still
is in Y and X. So chain calculations are possible.

-----------------------------------------------------------
Example:

111 [ENTER] 33 [ENTER] 7 [ENTER] 17
[ADD] => "706" 187
[MIX] => "3" "145" 187

Now subtract 1/187
1 [ENTER] 187
[SUBT] => "705" 187

[R/S] => "3" "144" 187
-----------------------------------------------------------
The [MIX] key can be used independently for displaying mixed fractions.
Example:
355 [ENTER] 113
[MIX] => "3" "16" 113.
-----------------------------------------------------------
Program RAW file:

https://www.dropbox.com/s/e3z1zdu5ak2gwpy/ArithmeticFractions.raw?dl=0

Photo:
[attachment=8571]

-----------------------------------------------------------

Gamo 6/10/2020