Quotient Fields

The Fraction domain implements quotients. The elements must belong to a domain of category IntegralDomain: multiplication must be commutative and the product of two non-zero elements must not be zero. This allows you to make fractions of most things you would think of, but don't expect to create a fraction of two matrices. The abbreviation for Fraction is FRAC. Use / to create a fraction.

The standard arithmetic operations are available.

Extract the numerator and denominator by using numer and denom, respectively.

Operations like max, min, negative?, positive?, and zero? are all available if they are provided for the numerators and denominators. See Integer for examples. Don't expect a useful answer from factor, gcd, or lcm if you apply them to fractions.

Since all non-zero fractions are invertible, these operations have trivial definitions.

Use map to apply factor to the numerator and denominator, which is probably what you mean.

Other forms of fractions are available, Use continuedFraction to create a continued fraction.

Use partialFraction to create a partial fraction. See continuedFraction and PartialFraction for additional information and examples.

Use conversion to create alternative views of fractions with objects moved in and out of the numerator and denominator.

Conversion is discussed in detail in Conversion.