ᱪᱷᱟᱸᱪ:Dec to frac/doc
This is a documentation subpage for ᱪᱷᱟᱸᱪ:Dec to frac. It contains usage information, categories and other content that is not part of the original ᱪᱷᱟᱸᱪ page. |
This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. You can conduct experiments, and should test all major changes, in either this template's sandbox, the general template sandbox, or your user space before changing anything here. |
ᱪᱷᱟᱸᱪ:Deprecated template 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, but due to algorithm limitation fractions with relatively large numerators/denominators may be left unresolved.
Examples
ᱥᱟᱯᱲᱟᱣ- {{dec to frac|3.6742|16}} → 3 ᱞᱟᱹᱭᱟᱜ ᱦᱩᱲᱟᱹᱜ : ᱵᱟᱝᱩᱭᱦᱟᱹᱨ < ᱠᱟᱹᱢᱤᱭᱟᱹ ᱾⁄ᱞᱟᱹᱭᱟᱜ ᱦᱩᱲᱟᱹᱜ : ᱵᱟᱝᱩᱭᱦᱟᱹᱨ < ᱠᱟᱹᱢᱤᱭᱟᱹ ᱾
- {{dec to frac|0.375|16}} → ᱞᱟᱹᱭᱟᱜ ᱦᱩᱲᱟᱹᱜ : ᱵᱟᱝᱩᱭᱦᱟᱹᱨ < ᱠᱟᱹᱢᱤᱭᱟᱹ ᱾⁄ᱞᱟᱹᱭᱟᱜ ᱦᱩᱲᱟᱹᱜ : ᱵᱟᱝᱩᱭᱦᱟᱹᱨ < ᱠᱟᱹᱢᱤᱭᱟᱹ ᱾
Sometimes it is impossible to convert a decimal to a vulgar fraction with requested denominator, in which cases the output is simply an input rounded up:
- {{dec to frac|3.99|8}} → 4
...or down:
- {{dec to frac|3.1|2}} → 3
When that is unacceptable, increase the denominator:
- {{dec to frac|3.99|100}} → 3 ᱞᱟᱹᱭᱟᱜ ᱦᱩᱲᱟᱹᱜ : ᱵᱟᱝᱩᱭᱦᱟᱹᱨ < ᱠᱟᱹᱢᱤᱭᱟᱹ ᱾⁄ᱞᱟᱹᱭᱟᱜ ᱦᱩᱲᱟᱹᱜ : ᱵᱟᱝᱩᱭᱦᱟᱹᱨ < ᱠᱟᱹᱢᱤᱭᱟᱹ ᱾
- {{dec to frac|3.1|10}} → 3 ᱞᱟᱹᱭᱟᱜ ᱦᱩᱲᱟᱹᱜ : ᱵᱟᱝᱩᱭᱦᱟᱹᱨ < ᱠᱟᱹᱢᱤᱭᱟᱹ ᱾⁄ᱞᱟᱹᱭᱟᱜ ᱦᱩᱲᱟᱹᱜ : ᱵᱟᱝᱩᱭᱦᱟᱹᱨ < ᱠᱟᱹᱢᱤᱭᱟᱹ ᱾
See also
ᱥᱟᱯᱲᱟᱣ- {{rndfrac}}