Difference between revisions of "Template:Min"

From LIMSWiki
Jump to navigationJump to search
(Created as needed.)
 
(Updated.)
Line 1: Line 1:
<includeonly>{{#invoke:Math|min}}</includeonly><noinclude>
<includeonly>{{#expr:{{#switch:<!--
-->{{#iferror:{{#expr:({{{1|}}})*1}}|0|1}}<!--
-->{{#iferror:{{#expr:({{{2|}}})*1}}|0|1}}<!--
-->{{#iferror:{{#expr:({{{3|}}})*1}}|0|1}}
|111={{min/3|({{{1}}})|({{{2}}})|({{{3}}})}}
|110={{min/2|({{{1}}})|({{{2}}})}}
|100={{{1}}}
|101={{min/2|({{{1}}})|({{{3}}})}}
|011={{min/2|({{{2}}})|({{{3}}})}}
|010={{{2}}}
|001={{{3}}}
}}}}</includeonly><noinclude>
{{Documentation}}
{{Documentation}}
</noinclude>
</noinclude>

Revision as of 01:30, 30 May 2013

[edit] [purge] Template documentation

Evaluates and returns the minimum of a list of numeric values. The parameters can be numeric expressions that will be evaluated. Empty or missing parameters are ignored.

Usage

Syntax:
{{min | value1 | value2 | value3 | value4 | ... }}
Examples:
{{min}}
{{min|}}
{{min|-7}} → -7
{{min|-7|}} → -7
{{min|7|-5}}Expression error: Unrecognized punctuation character "[".
{{min|7|-5|}}Expression error: Unrecognized punctuation character "[".
{{min|7|-5|-8}}Expression error: Unrecognized punctuation character "[".
{{min|40*41|300+30}}Expression error: Unrecognized punctuation character "[".
{{min|100+10|300+30|200+20}}Expression error: Unrecognized punctuation character "[".

See also

  • {{max}} giving the maximum