Template:Rndfrac
Appearance
This template rounds to a fraction. It takes two parameters.
- the number to be rounded (any real number)
- the denominator to be rounded to (positive interger)
Fractions are expressed in the simplest terms.
The template calls {{gcd}} and {{rndfrac/out}}.
{{rndfrac|0.1234|8}}
→ 1⁄8{{rndfrac|12.65|6}}
→ 12 2⁄3{{rndfrac|-9.123|20}}
→ −9 1⁄10