This site is supported by donations to The OEIS Foundation.

Template:~Min27

From OeisWiki
Jump to: navigation, search

The {{~Min27}} core function template (used by the {{MIN}} mathematical function template) gives the minimum of one to twenty-seven numbers or mathematical expressions, but should be used for ten to twenty-seven numbers or mathematical expressions, whereas {{~Min9}} should be used for four to nine numbers or mathematical expressions. This template

  • considers only the first twenty-seven arguments (ignores extra arguments);
  • considers only arguments (among the first twenty-seven) which are not undefined, empty string or white space characters (spaces, tabs, newlines) only;
  • returns empty string if all twenty-seven 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

{{~Min27|expression 1|(at least up to expression 10 is recommended)|expression 10|...|expression 27}}

Valid input

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

Examples

Examples with valid arguments

{{~Min27}} yields

(the empty string was returned)

{{~Min27|7|2|15|56|90|34|-65}} yields

-65

{{~Min27|7+1|2+1|15+1|56|90+1|34+1|-65+1|-8+1|78|878+1|-74+1|867+1|564+1|75+1|-67+1|77836+1|53565-125888|-2+1|837|873|-84|2874|287|4289|93|9927|-2731}} yields

-72323

{{~Min27|7|2|15|56|90|-2731|34|-65|-8|78|878|-74|867|564|75|-67|77836|53565|-2|837|873|-84|2874|287|4289|93|9927}} yields

-2731

{{~Min27|7|2|15|56|90|34|-65|-8|78|878|-74|867|564|75|-67|77836|53565|-2|837|873|-84|2874|287|4289|93|9927|-2731}} yields

-2731

{{~Min27|7|2|15|56|90|34|-65|-8|78|878|-74|867|564|75|-67|77836||-2|837|873|-84|2874|287|-2731|4289|93|9927}} yields

-2731 (note that the 17 th argument is empty)

{{~Min27|7|2|15|56|90|34|-65|{{formatnum:-2,000|R}}|78}} yields

-2000 (remove format from formatted numbers)

Examples with invalid arguments

{{~Min27|7|2|15|56|90|34|-65|-8|78|878|-74|867|564|75|-67|77836|53565|-2|837|873|-84|2874|287|4289|93|9927|63|-2731}} yields

-84 (the 28 th argument is ignored!)

{{~Min27|7|2|15|56|90|34|-65|-8|78|878|-74|867|564|75|-67|oops|837|873|-84|2874|287|4289|93|9927|-2731|63}} yields

Expression error: Unexpected < operator.

{{~Min27|7|2|15|56|90|34|-65|-8|78|878|-74|867|564|75|-67|2,000|837|873|-84|2874|287|4289|93|9927|-2731|63}} yields

Expression error: Unexpected < operator. (formatted numbers are not allowed!)

Code


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

  Should be used for ten to twenty-seven numbers or mathematical expressions

-->{{~Min3
  |                    {{~Min9|  {{{1|}}} |  {{{2|}}} |  {{{3|}}} |  {{{4|}}} |  {{{5|}}} |  {{{6|}}} |  {{{7|}}} |  {{{8|}}} |  {{{9|}}} }}
  | {{#if: {{{10|}}} | {{~Min9| {{{10|}}} | {{{11|}}} | {{{12|}}} | {{{13|}}} | {{{14|}}} | {{{15|}}} | {{{16|}}} | {{{17|}}} | {{{18|}}} }} }} 
  | {{#if: {{{19|}}} | {{~Min9| {{{19|}}} | {{{20|}}} | {{{21|}}} | {{{22|}}} | {{{23|}}} | {{{24|}}} | {{{25|}}} | {{{26|}}} | {{{27|}}} }} }}
}}</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)