7.2.2 Integral and fractional part of a rational number
Rational numbers are often broken up into integer and fractional
parts, where the fractional part has absolute value less than 1; i.e.,
the absolute value of the top integer is smaller than that of the
bottom integer. Such a fraction is called a proper fraction.
The propfrac
or propFrac command
writes a fraction as an integer plus a proper fraction.
-
propfrac takes
r, a rational number.
- propfrac(r) returns
where r=a/b is in lowest terms and
and a=b q+r.
(For rational expressions, see Section 11.6.8.)
Examples