உள்ளடக்கத்துக்குச் செல்

வார்ப்புரு:Dec to frac/doc

கட்டற்ற கலைக்களஞ்சியமான விக்கிப்பீடியாவில் இருந்து.
This is the documentation of Template:dec to frac.

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 nominators/denominators may be left unresolved.

Examples

[தொகு]
  • {{dec to frac|3.6742|16}} → 3 1116
  • {{dec to frac|0.375|16}} →  38

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 99100
  • {{dec to frac|3.1|10}} → 3 110


"https://ta.wikipedia.org/w/index.php?title=வார்ப்புரு:Dec_to_frac/doc&oldid=405808" இலிருந்து மீள்விக்கப்பட்டது