Difference between revisions of "Template:Rnd"

From Gobblerpedia
Jump to: navigation, search
imported>Matthazinski
m (1 revision: Infobox road template)
imported>Jo-jo eumerus
m (Changed protection level for "Template:Rnd": Allowing template editors on some templates with full protection dating back to pre-TPROT times which aren't too often or too sensitively used. ([Edit=Require template editor access] (indefi...)
Line 1: Line 1:
<includeonly>{{#iferror:{{#expr:{{{2}}}}}|{{rndnear|{{{1}}}|1E{{#expr:{{order of magnitude|{{{1}}}}}-1}}}}|{{formatnum:
+
<includeonly>{{#iferror:{{#expr:{{{2|0}}}}} |
  {{#ifexpr:({{{1|0}}})round({{{2|0}}})>=0.0001
+
  [[Category:Pages with bad rounding precision]]{{hid|Bad rounding here}}<!--
    |{{#ifexpr:({{{1}}})round({{{2}}})<1E9
+
  -->{{#invoke:Math|precision_format| {{{1}}} | 1-{{order of magnitude|{{{1}}}}} }}|
        |{{#ifexpr:<!--
+
  {{#invoke:Math|precision_format| {{{1}}} | {{{2|0}}}}}}}</includeonly><noinclude>
-->{{#expr:(({{{1}}})round({{{2}}})/1E5round0)*1E5}}={{#expr:({{{1}}})round({{{2}}})}}
 
          |{{#ifexpr:{{{2}}}<=0
 
              |{{#expr:({{{1}}})round({{{2}}})E-5}}00000
 
              |{{#expr:({{{1}}})round({{{2}}})E-5}}0000{{rnd/-|0|{{{2}}}}}
 
            }}
 
          |{{#ifexpr:{{{2}}}<=0
 
              |{{#expr:({{{1}}})round({{{2}}})}}
 
              |{{rnd/-|{{#expr:({{{1}}})round({{{2}}})}}|{{{2}}}}}
 
            }}
 
        }}
 
        |{{rnd/e+
 
          |{{#expr:({{{1}}})round({{{2}}})}}
 
          |{{{2}}}
 
          |{{Order of magnitude|{{#expr:({{{1}}})round({{{2}}})}}}}}}
 
      }}
 
    |{{#ifexpr:({{{1|0}}})round({{{2|0}}})<=-0.0001
 
        |{{#ifexpr:({{{1}}})round({{{2}}})>-1E9
 
          |{{#ifexpr:<!--
 
-->{{#expr:(({{{1}}})round({{{2}}})/1E5round0)*1E5}}={{#expr:({{{1}}})round({{{2}}})}}
 
              |{{#ifexpr:{{{2}}}<=0
 
                |−{{#expr:-({{{1}}})round({{{2}}})E-5}}00000
 
                |−{{#expr:-({{{1}}})round({{{2}}})E-5}}0000{{rnd/-|0|{{{2}}}}}
 
              }}
 
              |{{#ifexpr:{{{2}}}<=0
 
                |−{{#expr:-({{{1}}})round({{{2}}})}}
 
                |−{{rnd/-|-{{#expr:({{{1}}})round({{{2}}})}}|{{{2}}}}}
 
              }}
 
            }}
 
          |−{{rnd/e+
 
              |-{{#expr:({{{1}}})round({{{2}}})}}
 
              |{{{2}}}
 
              |{{Order of magnitude|{{#expr:({{{1}}})round({{{2}}})}}}}}}
 
        }}
 
        |{{#ifexpr:({{{1|0}}})round({{{2|0}}})=0
 
          |{{#ifexpr:{{{2|0}}}<=0
 
              |0
 
              |{{rnd/-|0|{{{2}}}}}
 
            }}
 
          |{{#ifexpr:({{{1}}})round({{{2}}})>0
 
              |{{rnd/e−
 
                |{{#expr:({{{1}}})round({{{2}}})}}
 
                |{{{2}}}
 
                |{{Order of magnitude|({{{1}}})round({{{2}}})}}
 
              }}
 
              |−{{rnd/e−
 
                |-{{#expr:({{{1}}})round({{{2}}})}}
 
                |{{{2}}}
 
                |{{Order of magnitude|{{#expr:({{{1}}})round({{{2}}})}}}}
 
              }}
 
            }}
 
        }}
 
      }}
 
  }}
 
}}}}</includeonly><noinclude>
 
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 12:38, 25 March 2017

Template documentation[create]