Jump to content

ᱪᱷᱟᱸᱪ:Rndgaps/doc

ᱣᱤᱠᱤᱯᱤᱰᱤᱭᱟ, ᱨᱟᱲᱟ ᱜᱮᱭᱟᱱ ᱯᱩᱛᱷᱤ ᱠᱷᱚᱱ

Like {{rnd}}, this template rounds {{{1}}} to {{{2}}} decimal places (goes the other way for negatives) and includes trailing zeros. Also like {{rnd}}, scientific notation is used for numbers whose absolute value is greater than or equal to 1 × 109, or less than 1 × 10−4. It differs from {{rnd}} in that it uses thin gaps to delimit numbers like {{val}} (see also {{gaps}}).

Examples:

  • {{rndgaps|2.0004|3}} → 2.000
  • {{rndgaps|0.000020004|7}} → 2.Expression error: ᱵᱟᱝ ᱧᱮᱞ ᱴᱷᱤᱠᱚᱜᱠᱟᱱ ᱪᱤᱱᱦᱟᱹ ᱠᱚ "[".×10−5
  • {{rndgaps|0|8}} → 0.Expression error: ᱵᱟᱝ ᱧᱮᱞ ᱴᱷᱤᱠᱚᱜᱠᱟᱱ ᱪᱤᱱᱦᱟᱹ ᱠᱚ "[".
  • {{rndgaps|154268|-3}} → 154000
  • {{rndgaps|1200004|-1}} → 1200000
  • {{rndgaps|1300004|-1}} → 1300000
  • {{rndgaps|4.1e6|9}} → 4099999.999Expression error: ᱵᱟᱝ ᱧᱮᱞ ᱴᱷᱤᱠᱚᱜᱠᱟᱱ ᱪᱤᱱᱦᱟᱹ ᱠᱚ "[".
  • {{rndgaps|4.1e6|10}} → 4099999.999Expression error: ᱵᱟᱝ ᱧᱮᱞ ᱴᱷᱤᱠᱚᱜᱠᱟᱱ ᱪᱤᱱᱦᱟᱹ ᱠᱚ "[".
  • {{rndgaps|1542689271|-7}} → 1.Expression error: ᱵᱟᱝ ᱧᱮᱞ ᱴᱷᱤᱠᱚᱜᱠᱟᱱ ᱪᱤᱱᱦᱟᱹ ᱠᱚ "[".×109
  • {{rndgaps|1542689271|2}} → 1.Expression error: ᱵᱟᱝ ᱧᱮᱞ ᱴᱷᱤᱠᱚᱜᱠᱟᱱ ᱪᱤᱱᱦᱟᱹ ᱠᱚ "[".×109
  • {{rndgaps|7e9|-9}} → 7×109
  • {{rndgaps|-123|1}} → −123.0
  • {{rndgaps|-1200007|-2}} → −1200000
  • {{rndgaps|-1234567899|-7}} → −1.Expression error: ᱵᱟᱝ ᱧᱮᱞ ᱴᱷᱤᱠᱚᱜᱠᱟᱱ ᱪᱤᱱᱦᱟᱹ ᱠᱚ "[".×109

As with #expr, the total number of significant digits is not more than 14:

  • {{rndgaps|1234567890.123456789|10}} → 1.Expression error: ᱵᱟᱝ ᱧᱮᱞ ᱴᱷᱤᱠᱚᱜᱠᱟᱱ ᱪᱤᱱᱦᱟᱹ ᱠᱚ "[".×109
  • {{rndgaps|123456789.0123456789|10}} → 123456789.012Expression error: ᱵᱟᱝ ᱧᱮᱞ ᱴᱷᱤᱠᱚᱜᱠᱟᱱ ᱪᱤᱱᱦᱟᱹ ᱠᱚ "[".
  • {{rndgaps|.0001234567890123456789|20}} → 0.000Expression error: ᱵᱟᱝ ᱧᱮᱞ ᱴᱷᱤᱠᱚᱜᱠᱟᱱ ᱪᱤᱱᱦᱟᱹ ᱠᱚ "[".

The template uses the following.

  • {{val/delimitnum/fraction}} — for trailing zeros
  • {{rndgaps/e+}} — for scientific notation for numbers greater than or equal to 109 or less than or equal to −109
  • {{rndgaps/e−}} — for scientific notation for numbers greater than −10−4 and less than 10−4 but not equal to zero