Integer Fraction Arithmetic Calculator
PHP Program by Jay Tanner
Integer Fraction (
A
/
B
)
A
B
Integer Fraction (
C
/
D
)
C
D
Double-Click Within Text Area to Select ALL Text
--------------------------------------------------------------- Integer Fractions: A/B = 0 / 1 and C/D = 0 / 1 --------------------------------------------------------------- RAW Fractional Result: (A/B) + (C/D) = E/F E/F = 0 / 1 --------------------------------------------------------------- REDUCED Fractional Result: GCD(E/F) = 1 (E/GCD) / (F/GCD) = G/H G/H = 0 / 1 Result cannot be reduced any further. --------------------------------------------------------------- PLAIN DECIMAL Result: E/F = G/H = 0
GENERAL INFORMATION This program performs basic signed integer fraction arithmetic. It applies arbitrary-precison arithmetic so that it can handle some very large integers. A/B = Signed integers representing Numerator/Denominator of 1st fraction. C/D = Signed integers representing Numerator/Denominator of 2nd fraction. E/F = Raw fractional result of operation prior to reduction to lowest terms. GCD = Greatest Common Divisor of both numerator and denominator (E/F). The GCD is used to reduce the fraction (E/F) to lowest terms (G/H). Some fractions will already be in lowest terms and cannot be reduced any further. Such is the case when GCD = 1. G/H = Fractional result of operation (E/F), reduced to lowest terms. Where: G/H = (E/GCD) / (F/GCD) NOTE: The button to generate randomized fractions is for experimentation.
THE BASIC RULES OF FRACTIONAL ARITHMETIC
Given Two Integer Fractions (A/B) and (C/D)
GCD = Greatest Common Divisor of Both Numerator and Denominator
Program by Jay Tanner
Revised: Thursday, January 01, 1970 at 12:00:00 AM UTC