*************************************************************************** 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 = (14240740 / 7711) and C/D = (329 / 15319395) =========================================================================== ADD: (A/B) + (C/D) = (A*D + B*C) / (B*D) = E / F = (14240740 / 7711) + (329 / 15319395) Raw Fraction = 218159523689219 / 118127854845 GCD = 7 Reduced Fraction = 31165646241317 / 16875407835 Plain decimal value truncated at 50 decimals without rounding = 1846.80847692929253582095724206833665540267519110894424 =========================================================================== SUBTRACT: (A/B) − (C/D) = (A*D − B*C) / (B*D) = E / F = (14240740 / 7711) - (329 / 15319395) Raw Fraction = 218159518615381 / 118127854845 GCD = 7 Reduced Fraction = 31165645516483 / 16875407835 Plain decimal value truncated at 50 decimals without rounding = 1846.80843397720467595442857040734743226429407357786680 =========================================================================== MULTIPLY: (A/B)*(C/D) = (A*C) / (B*D) = E / F = (14240740 / 7711) * (329 / 15319395) Raw Fraction = 4685203460 / 118127854845 GCD = 43645 Reduced Fraction = 107348 / 2706561 Plain decimal value truncated at 50 decimals without rounding = 0.03966213951948616713238681854944337112668068445529 =========================================================================== DIVIDE: (A/B) / (C/D) = (A*D) / (B*C) = E / F = (14240740 / 7711) / (329 / 15319395) Raw Fraction = 218159521152300 / 2536919 GCD = 7 Reduced Fraction = 31165645878900 / 362417 Plain decimal value truncated at 50 decimals without rounding = 85993885.16239580372885377893421114351699837480029910296702 ===========================================================================