Jump to content

Template:Dec to frac

From IdeaWazaWiki
Revision as of 19:20, 3 August 2007 by wikademia>Ezhiki (+doc)

This template converts decimal fractions to vulgar fractions. It takes two parameters:

  • fraction to be converted;
  • resulting vulgar fraction's denominator

If the decimal fraction includes an integer part, it is retained in the output. If the resulting vulgar fraction can be resolved in lower terms than specified denominator, it is resolved.

Examples

Known issues

Since the resulting fraction is the closest of what can be achieved using the supplied denominator, this template may occasionally produce odd results: