Template:Dec to frac/doc



This template converts a decimal fraction to a vulgar fraction which is equal to the result of rounding to a multiple of one divided by a given denominator. 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, but due to algorithm limitation fractions with relatively large nominators/denominators may be left unresolved.

Examples

 * &rarr;
 * &rarr;
 * &rarr;
 * &rarr;
 * &rarr;

To reduce rounding errors, increase the denominator:
 * &rarr;
 * &rarr;
 * &rarr;
 * &rarr;