A fraction represents a part of a whole.
A fraction consists of a numerator displayed above a line, and a denominator below.
- An proper fraction must be less than 1, like
3/4
and7/12
. - An improper fraction is more than 1, like
9/2
and13/4
. - A mixed fraction is a whole number and a portion less than 1 together, like
2 3/4
. - A reciprocal is another fraction with the numerator and denominator exchanged, like
3/7
for7/3
.
An interesting aspect of fractions and prime factorization is that multiplying fractions is the same as adding the prime numerators and subtracting the prime denominators.
Multiplication | ||
---|---|---|
42 | 5 / 14 | 15 |
21 x 31 x 71 / 1 | 5+1 / 2-1 x 7-1 | 31 x 51 / 1 |
For example, multiplying 42 by 5/14
means incrementing the power of prime 5, and decrementing the power of primes 2 and 7 — For a result of 42. A division is simply the inversion of the effects of the numerator and denumerator.
Division | ||
---|---|---|
15 | 5 / 14 | 42 |
31 x 51 / 1 | 5-1 / 2+1 x 7+1 | 21 x 31 x 71 / 1 |
Addition/Subtraction
To add fractions containing unlike quantities , it is necessary to convert all amounts to like quantities.
1/4 + 1/3 1*3/4*3 + 1*4/3*4 3/12 + 4/12 = 7/12
The process for subtracting fractions is, in essence, the same as that of adding them: find a common denominator, and change each fraction to an equivalent fraction with the chosen common denominator.
Multiplication
To multiply fractions, multiply the numerators and multiply the denominators.
2/3 * 3/4 = 6/12
This particularity serves as the basis for the Fractran programming language, it is also of interest for reversible computation.
Reducing
Dividing the numerator and denominator of a fraction by the same non-zero number yields an equivalent fraction: if the numerator and the denominator of a fraction are both divisible by a number (called a factor) greater than 1, then the fraction can be reduced to an equivalent fraction with a smaller numerator and a smaller denominator.
Recursive Method
function gcd(a, b) if b = 0 return a else return gcd(b, a mod b)
Comparing
Comparing fractions with the same positive denominator yields the same result as comparing the numerators.
The line that separates the numerator and the denominator is called a vinculum, which is also the word used to describe ‘a connecting band of tissue, such as that attaching a flexor tendon to the bone of a finger or toe’.
incoming cccc arithmetic fractran fractran