<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="nl">
	<id>https://informatiestandaarden.test-nictiz.nl/index.php?action=history&amp;feed=atom&amp;title=Sjabloon%3ARndpad</id>
	<title>Sjabloon:Rndpad - Bewerkingsoverzicht</title>
	<link rel="self" type="application/atom+xml" href="https://informatiestandaarden.test-nictiz.nl/index.php?action=history&amp;feed=atom&amp;title=Sjabloon%3ARndpad"/>
	<link rel="alternate" type="text/html" href="https://informatiestandaarden.test-nictiz.nl/index.php?title=Sjabloon:Rndpad&amp;action=history"/>
	<updated>2026-04-28T08:56:43Z</updated>
	<subtitle>Bewerkingsoverzicht voor deze pagina op de wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://informatiestandaarden.test-nictiz.nl/index.php?title=Sjabloon:Rndpad&amp;diff=2295&amp;oldid=prev</id>
		<title>Ahenket: Nieuwe pagina aangemaakt met &#039;&lt;noinclude&gt;&lt;!-- -============================================================= - Template:Rndpad - round 11-digit billions &amp; pad end zeroes -=======================...&#039;</title>
		<link rel="alternate" type="text/html" href="https://informatiestandaarden.test-nictiz.nl/index.php?title=Sjabloon:Rndpad&amp;diff=2295&amp;oldid=prev"/>
		<updated>2013-07-18T09:16:01Z</updated>

		<summary type="html">&lt;p&gt;Nieuwe pagina aangemaakt met &amp;#039;&amp;lt;noinclude&amp;gt;&amp;lt;!-- -============================================================= - Template:Rndpad - round 11-digit billions &amp;amp; pad end zeroes -=======================...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nieuwe pagina&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;!--&lt;br /&gt;
-=============================================================&lt;br /&gt;
- Template:Rndpad - round 11-digit billions &amp;amp; pad end zeroes&lt;br /&gt;
-=============================================================&lt;br /&gt;
--                              (see NOTES at bottom)&lt;br /&gt;
--&amp;gt;&amp;lt;/noinclude&amp;gt;{{&lt;br /&gt;
  #ifexpr: abs( {{{1|0}}} ) &amp;gt; 84999999999 &amp;lt;!--85 billion&lt;br /&gt;
--&amp;gt;  or abs( {{{1|7.58}}} ) &amp;lt; 1E-7  &amp;lt;!--tiny below 0.00000001&lt;br /&gt;
--then just use--&amp;gt;|{{rnd|{{{1|89730000006.40}}}&amp;lt;!--&lt;br /&gt;
  --&amp;gt;|{{{2|-7}}} }}&amp;lt;!--over 85 billion, allow scientific notation&lt;br /&gt;
&lt;br /&gt;
--else--&amp;gt;|&amp;lt;!--round up to 85 billion as split 11-digit form...&lt;br /&gt;
--&amp;gt;{{#ifexpr:({{{1|7.58}}}) round ({{{2|-5}}}) &amp;gt; 99999 |&amp;lt;!--&lt;br /&gt;
--then-show-digits-above-99,999--&amp;gt;{{#expr:&lt;br /&gt;
  floor( ( ({{{1|7.58}}}) round ({{{2|-5}}}) )/100000&lt;br /&gt;
   + 1E-9 ) }}&amp;lt;!--add to unbug floor(x) &amp;amp; truncate, see NOTE F3&lt;br /&gt;
&lt;br /&gt;
--show-each-zero-above-rounded-remainder--&amp;gt;{{&lt;br /&gt;
#ifexpr:(( {{{1|7.58}}} round {{{2|-5}}})+1E-9) mod 1E5 &amp;lt; 10000|&amp;lt;!--then show &amp;quot;0&amp;quot;--&amp;gt;0}}{{&lt;br /&gt;
#ifexpr:(( {{{1|7.58}}} round {{{2|-5}}})+1E-9) mod 1E5 &amp;lt; 1000|&amp;lt;!--then show &amp;quot;0&amp;quot;--&amp;gt;0}}{{&lt;br /&gt;
#ifexpr:(( {{{1|7.58}}} round {{{2|-5}}})+1E-9) mod 1E5 &amp;lt; 100|&amp;lt;!--then show &amp;quot;0&amp;quot;--&amp;gt;0}}{{&lt;br /&gt;
#ifexpr:(( {{{1|7.58}}} round {{{2|-5}}})+1E-9) mod 1E5 &amp;lt; 10|&amp;lt;!--then show &amp;quot;0&amp;quot;--&amp;gt;0}}&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
--round remainder--&amp;gt;{{&lt;br /&gt;
  #ifexpr: {{{2|-5}}} &amp;lt; 1&lt;br /&gt;
  |&amp;lt;!--then round remainder simply&lt;br /&gt;
  --&amp;gt;{{#expr:(( {{{1|7.58}}} round {{{2|-5}}})+1E-9) mod 1E5}}&lt;br /&gt;
  |&amp;lt;!--else use {rnd/-}--&amp;gt;{{rnd/-|{{#expr: ( {{{1|7.58}}}&lt;br /&gt;
         round {{{2|-5}}})+1E-9) mod 1E5&lt;br /&gt;
         }}|{{{2|-5}}} }}&amp;lt;!--end {rnd/-}&lt;br /&gt;
  --&amp;gt;}}&amp;lt;!--endifexpr {2} &amp;lt; 1&lt;br /&gt;
&lt;br /&gt;
 --else-round below 100thousand&lt;br /&gt;
 --&amp;gt;|{{rnd/-|{{#expr:({{{1|80561.4503}}}) round ({{{2|3}}}) }}|{{#expr:{{{2|3}}} }} }}&amp;lt;!--end rnd/-&lt;br /&gt;
&lt;br /&gt;
 --&amp;gt;}}&amp;lt;!--endif-{1}&amp;gt;100thousand&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;}}&amp;lt;!--endif {1}&amp;gt;85billion or {2}&amp;lt; -4 --&lt;br /&gt;
--&amp;gt;&amp;lt;noinclude&amp;gt;&amp;lt;!--&lt;br /&gt;
-=============================================================&lt;br /&gt;
-&lt;br /&gt;
-NOTES:&lt;br /&gt;
-  This Template:Rndpad rounds to 85 billion in 11-digit form,&lt;br /&gt;
-  and pads any trailing zeroes for round&amp;gt;0. If amount exceeds&lt;br /&gt;
-  85 billion or rounding exceeds 100-thousands (&amp;lt; -5) then&lt;br /&gt;
-  this template invokes [[Template:Rnd]] &amp;amp; allows scientific&lt;br /&gt;
-  notation for amounts above 85 billion. Otherwise, it rounds&lt;br /&gt;
-  amounts very quicky, using only the 1 subtemplate {{rnd/-}},&lt;br /&gt;
-  which ensures pad with trailing zeros in decimals (x.x00).&lt;br /&gt;
-  The expansion depth is 4 of the 40 expansion depth limit,&lt;br /&gt;
-  for amounts &amp;lt; 85 billion.&lt;br /&gt;
-&lt;br /&gt;
- NOTE L1: The limit to upper rounding is -11 for hundreds of&lt;br /&gt;
-   billions. The max number to still allow padded end-zeroes&lt;br /&gt;
-   &amp;quot;000&amp;quot; is 85 billion, due to scientific notation being shown&lt;br /&gt;
-   for the upper half of the digits when more than 85 billion.&lt;br /&gt;
-   Numbers &amp;gt;99,999 are split by modulo: {1} round {2} mod 1E5.&lt;br /&gt;
-&lt;br /&gt;
- NOTE N2: For smaller numbers &amp;amp; {2} &amp;lt; 1, {{rndpad}} will use&lt;br /&gt;
--  template {{rnd/-}} to pad any trailing decimal zeroes.&lt;br /&gt;
--  But, for amounts over 85 billion, using {{rndpad}} will&lt;br /&gt;
-   invoke up to 9 subtemplates, among the following:&lt;br /&gt;
-       Template:Order_of_magnitude (view source) (protected)&lt;br /&gt;
-       Template:Order_of_magnitude/x (view source) (protected)&lt;br /&gt;
-       Template:Rnd (view source) (protected)&lt;br /&gt;
-       Template:Rnd/- (view source) (protected)&lt;br /&gt;
-       Template:Rnd/b1 (view source) (protected)&lt;br /&gt;
-       Template:Rnd/b-1 (view source) (protected)&lt;br /&gt;
-       Template:Rnd/c6dec0 (view source) (protected)&lt;br /&gt;
-       Template:Rnd/c8dec0 (view source) (protected)&lt;br /&gt;
-       Template:Rnd/d (view source) (protected)&lt;br /&gt;
-       Template:Rnd/e+ (view source) (protected)&lt;br /&gt;
-   Those subtemplates might exceed the template-nesting limit,&lt;br /&gt;
-   such as inside nested infoboxes with 3-level nested-if&lt;br /&gt;
-   expressions (assuming limit of 40 nested if-expressions).&lt;br /&gt;
-&lt;br /&gt;
- NOTE F3: The adjustment adds 0.000000001 to fix floor(x).&lt;br /&gt;
-   The math function floor(x) experiences a bug whenever&lt;br /&gt;
-   numbers are close to a whole digit, yet floor to 1 less:&lt;br /&gt;
-   {{#expr: ({{{1|180333}}}round{{{2|-5}}})/100000 }} = 2&lt;br /&gt;
-   but floor ( ({{{1|180333}}}round{{{2|-5}}})/100000) = 1.&lt;br /&gt;
-   Even though an amount rounded -5 as 200 thousand &amp;amp; divided&lt;br /&gt;
-   by 100 thousand, shows as &amp;quot;2&amp;quot;, floor of that can be &amp;quot;1&amp;quot;.&lt;br /&gt;
-   That is why 1E-9 (0.000000001) is added to fix floor(x).&lt;br /&gt;
-   Exact: 2 - (180333 round -5)/10E5 = 2.2204460492503E-16&lt;br /&gt;
-&lt;br /&gt;
- NOTE R4: Rounding by a rounded count: Parentheses are used&lt;br /&gt;
-   around the round-digit count to allow an expression, such&lt;br /&gt;
-   as &amp;quot;( {{{2|0.5 round 0}}} )&amp;quot; to be a rounded count. The&lt;br /&gt;
-   parentheses ensure the &amp;quot;round 0&amp;quot; will apply to 0.5 as 1,&lt;br /&gt;
-   rather than have 0.5 enter into the nearby calculation, as&lt;br /&gt;
-   &amp;quot;4.16 round 0.5 round 0&amp;quot; versus &amp;quot;4.16 round (0.5 round 0)&amp;quot;.&lt;br /&gt;
-   Otherwise, the 1st round has precedence: &amp;quot;4.16 round 0.5&amp;quot;.&lt;br /&gt;
-&lt;br /&gt;
-=============================================================&lt;br /&gt;
-HISTORY:&lt;br /&gt;
-11Mar10 Created to round to 10 billion as 10 digits, pad end 0.&lt;br /&gt;
-11Mar10 Put NOTES comments to explain template coding.&lt;br /&gt;
-11Mar10 Put HISTORY comments to log major changes.&lt;br /&gt;
-11Mar10 Changed to use {rnd} when round less than -4.&lt;br /&gt;
-11Mar10 Changed to round 11-digit form, up to 85 billion.&lt;br /&gt;
-20Nov10 Changed to allow round -5 up to xx,951,000 of million.&lt;br /&gt;
-11Jan11 Fixed rounded-up portions &amp;gt;999,999 to use {{rnd}}.&lt;br /&gt;
-11Jan11 Fixed to split digits &amp;gt;99,999 only after rounding.&lt;br /&gt;
-11Jan11 Fixed to put 5 zeroes if any portion rounds &amp;gt; 99,999.&lt;br /&gt;
-11Jan11 Fixed to put 5 zeroes if rounding count &amp;lt; -4.&lt;br /&gt;
-11Jan11 Fixed floor(x) math bug by adding 1E-9 (0.000000001).&lt;br /&gt;
-16Jan11 Fixed for negative exponents, abs(x) &amp;lt; 0.0000001.&lt;br /&gt;
-18Jan11 Removed use of {formatnum:} to avoid commas.&lt;br /&gt;
-19Jan11 Put many parentheses &amp;quot;()&amp;quot; to round by an expression.&lt;br /&gt;
-20Jan11 Put #expr in {rnd/-} parms to cut argument size 60%.&lt;br /&gt;
-18Feb11 Fixed for whole billions to allow round -6 to -11.&lt;br /&gt;
-20Feb11 Numbers &amp;gt;99,999 are split by: {1} round {2} mod 1E5.&lt;br /&gt;
-20Feb11 Fixed rounding bug by: ({1} round {2})+1E-9 mod 1E5.&lt;br /&gt;
-20Feb11 Fixed whole 100-thousands &amp;quot;00000&amp;quot; by rounding first.&lt;br /&gt;
-20Feb11 Used quick {doc_short} rather than {documentation}.&lt;br /&gt;
-&lt;br /&gt;
--&amp;gt;{{doc_short}}&lt;br /&gt;
&lt;br /&gt;
[[Category:2010 Convert unit subtemplates]]&lt;br /&gt;
[[Category:Subtemplates of Template Convert]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ahenket</name></author>
	</entry>
</feed>