***************************************************************************
        ARBITRARY-PRECISION SIGNED INTEGER FRACTION ARITHMETIC DEMO

===========================================================================
GIVEN THE TWO INTEGER FRACTION STRINGS BELOW, THE FOUR BASIC ARITHMETIC
OPERATIONS (ADD, SUB, MUL and DIV) ARE PERFORMED ON THEM.  REFRESH THIS
PAGE FOR NEW RANDOMIZED EXAMPLE FRACTIONS.

A/B = (5193576 / 3426)
and
C/D = (-3885 / 23466362)

===========================================================================
ADD: (A/B) + (C/D)  =  (A*D + B*C) / (B*D)  =  E / F

= (5193576 / 3426) + (-3885 / 23466362)

Raw Fraction     = 121874321180502 / 80395756212
GCD              = 222
Reduced Fraction = 548983428741 / 362143046

Plain decimal value truncated at 50 decimals without rounding =
1515.92978190446876619025289802196008480030291676510612

===========================================================================
SUBTRACT: (A/B) − (C/D)  =  (A*D − B*C) / (B*D)  =  E / F

= (5193576 / 3426) - (-3885 / 23466362)

Raw Fraction     = 121874347800522 / 80395756212
GCD              = 222
Reduced Fraction = 548983548651 / 362143046

Plain decimal value truncated at 50 decimals without rounding =
1515.93011301672212697962451003408194672333981528393064

===========================================================================
MULTIPLY: (A/B)*(C/D)  =  (A*C) / (B*D)  =  E / F

= (5193576 / 3426) * (-3885 / 23466362)

Raw Fraction     = -20177042760 / 80395756212
GCD              = 604284
Reduced Fraction = -33390 / 133043

Plain decimal value truncated at 50 decimals without rounding =
-0.25097149042039040009620949617792743699405455379087

===========================================================================
DIVIDE: (A/B) / (C/D)  =  (A*D) / (B*C)  =  E / F

= (5193576 / 3426) / (-3885 / 23466362)

Raw Fraction     = 121874334490512 / -13310010
GCD              = 666
Reduced Fraction = 182994496232 / -19985

Plain decimal value truncated at 50 decimals without rounding =
-9156592.25579184388291218413810357768326244683512634475856

===========================================================================