This site is supported by donations to The OEIS Foundation.

Template:~Min9/doc

From OeisWiki
Jump to: navigation, search

This documentation subpage contains instructions, categories, or other information for Template:~Min9. [<Edit> Template:~Min9]

[⧼Purge⧽ Template:~Min9/doc]

The {{~Min9}} core function template (used by the {{MIN}} mathematical function template) gives the minimum of one to nine numbers or mathematical expressions, but should be used for four to nine numbers or mathematical expressions, where {{~Min3}} should be used for one to three numbers or mathematical expressions. This template

  • considers only the first nine arguments (ignores extra arguments);
  • considers only arguments (among the first nine) which are not undefined, empty string or white space characters (spaces, tabs, newlines) only;
  • returns empty string if all nine arguments are undefined, empty string or white space characters (spaces, tabs, newlines) only;
  • returns an error message when a considered argument does not evaluate to a number (arguments require prior validation).

Usage

{{~Min9|expression 1|expression 2|expression 3|expression 4}}
(...)
{{~Min9|expression 1|expression 2|expression 3|expression 4|expression 5|expression 6|expression 7|expression 8|expression 9}}

Valid input

One to nine expressions yielding numbers (requires prior validation) as arguments. Extra arguments are ignored! Arguments (among the first nine) which are undefined, empty string or white space characters (spaces, tabs, newlines) only are ignored.

Examples

Examples with valid arguments

Code Result Comment
{{~Min9}} (empty string)
{{~Min9|7+1}} 8
{{~Min9|7+1|2+1|15+1}} 3
{{~Min9|7|2|15|56|90|34|-65|-8|78}} -65
{{~Min9|7|2|15|56|90|34|-8|78}} -8
{{~Min9|7|2|15|56||90|34|-8|78}} -8 (fifth argument is empty)
{{~Min9|7|2|15|56|90|34|78}} 2
{{~Min9|7|15|56|90|34|78}} 7
{{~Min9|15|56|90|34|78}} 15
{{~Min9|56|90|34|78}} 34
{{~Min9|7+1|2+1|15+1|56+1|90+1|34+1|-65+1|-8+1|78+1}} -64
{{~Min9|7|2|15|56|90|34|-65|{{formatnum:-2,000|R}}|78}} -2000 (remove format from formatted numbers)

Examples with invalid arguments

Code Result Comment
{{~Min9|7|2|15|56|90|34|-65|2,000|78}} Expression error: Unexpected < operator. (can't use formatted numbers)
{{~Min9|7|2|15|56|90|34|-65|oops|78}} Expression error: Unexpected < operator.
{{~Min9|7|2|15|56|90|34|-65|-8|78|-67}} -65 (tenth argument ignored!)

Code


<noinclude>{{Documentation}}</noinclude><includeonly><!--

  Should be used for four to nine numbers or mathematical expressions

-->{{~Min3
| {{~Min3| {{{1|}}} | {{{2|}}} | {{{3|}}} }} 
| {{~Min3| {{{4|}}} | {{{5|}}} | {{{6|}}} }}
| {{~Min3| {{{7|}}} | {{{8|}}} | {{{9|}}} }}
}}</includeonly>

See also

  • {{min}} minimum of one to three expressions yielding numbers
  • {{max}} maximum of one to three expressions yielding numbers


  • {{MIN}} minimum of one to eighty-one expressions yielding numbers
  • {{MAX}} maximum of one to eighty-one expressions yielding numbers


  • Core function templates (used ONLY by {{MIN}}; do NOT use directly!)
    • {{~Min3}} (should be used for up to three numbers or mathematical expressions)
    • {{~Min9}} (should be used for four to nine numbers or mathematical expressions)
    • {{~Min27}} (should be used for ten to twenty-seven numbers or mathematical expressions)
    • {{~Min81}} (should be used for twenty-eight to eighty-one numbers or mathematical expressions)


  • Core function templates (used ONLY by {{MAX}}; do NOT use directly!)
    • {{~Max3}} (should be used for up to three numbers or mathematical expressions)
    • {{~Max9}} (should be used for four to nine numbers or mathematical expressions)
    • {{~Max27}} (should be used for ten to twenty-seven numbers or mathematical expressions)
    • {{~Max81}} (should be used for twenty-eight to eighty-one numbers or mathematical expressions)