80561.450

[തിരുത്തുക] [പുതുക്കുക] ഫലകത്തിന്റെ വിവരണം

The rounding routine Template:Rndpad can round up to 85 billion as 11-digit format, with decimals padded by trailing zeroes, when the round setting > -11, but can display scientific notation above 85 billion (8.5E+10) for any number of digits.

### Detailed examples

Examples of rounding to each of 6-12 digits:
• {{rndpad|90711.45003| -4 }}   → 90000
• {{rndpad|80561.45003| -5 }}   → 100000
• {{rndpad|80561.45003| -4 }}   → 80000
• {{rndpad|80561.45003| -3 }}   → 81000
• {{rndpad|80561.45003| -2 }}   → 80600
• {{rndpad|80561.45003| -1 }}   → 80560
• {{rndpad|80561.45003| 0 }}   → 80561
• {{rndpad|80561.45003| 1 }}   → 80561.5
• {{rndpad|80561.45003| 2 }}   → 80561.45
• {{rndpad|80561.45003| 3 }}   → 80561.450
• {{rndpad|80561.45003| 4 }}   → 80561.4500
• {{rndpad|80561.45003| 5 }}   → 80561.45003
• {{rndpad|80561.45003| 6 }}   → 80561.450030

### Technical issues

The Template:Rndpad avoids subtemplates when rounding to whole integer amounts, and uses only one subtemplate, {{rnd/-}}, when rounding decimal portions of numbers below 85 billion. In those cases, the internal markup coding is nested only 3 levels deep, of nested-if expressions. However, for numbers over 85 billion, up to 8 subtemplates are invoked, and the nesting level can be more than 12 levels deep. Inside a single page, invoking {{rndpad}} uses only 1 level of nesting, so an if-expression could be nested 39 levels deep, and then invoke rndpad as the 40th-level of nesting. However, inside an infobox, the depth-limit message might be announced as "Expansion depth limit exceeded" at 41 levels.

Internally, {Rndpad} uses math function floor(x) or "x mod n" to truncate decimal digits; however, to bypass a system-math bug, the template adds 1E-9 (x+0.000000001) to the amount before using floor(x) or "x mod n". If that math bug is fixed, the result should still calculate correctly.

• `{{rnd|amount|n}}` - round amount, allow scientific notation at 8.0E+5
• `{{rnd/-|amount|n}}` - round a decimal padded with trailing zeroes