This site is supported by donations to The OEIS Foundation.

Template:~Max81/doc

From OeisWiki
Jump to: navigation, search

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

[⧼Purge⧽ Template:~Max81/doc]

The {{~Max81}} core function template (used by the {{MAX}} mathematical function template) gives the maximum of one to eighty-one numbers or mathematical expressions, but should be used for twenty-eight to eighty-one numbers or mathematical expressions, whereas {{~Max27}} should be used for ten to twenty-seven numbers or mathematical expressions. This template

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

{{~Max81|expression 1| (at least up to expression 28 is recommended)|expression 28|...|expression 81}}

Valid arguments

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

Examples

Examples with valid arguments

{{~Max81}} yields

(empty string is returned)

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

90

{{~Max81|7+4|2+4|15+4|56+4|90+4|34+4|-65+184}} yields

119

{{~Max81|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

77836

{{~Max81|7|2|15|56|90|34|-65|{{formatnum:2,000|R}}|78}} yields (remove format from formatted numbers)

2000
{{~Max81
|   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
|   3|   0|   35|   56|  90|  34| -65|  -8|  67| 878| -74| 367| 564|  75| -62| -789|53565|   -2|  837|  873|-2884| 2874|  287| 4289|   93| 9927|-7771
}}

yields

77836
{{~Max81
|   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
|   3|   0|   35|   56|  90|  34| -65|  -8|  67| 878| -74| 367| 564|  75| -62| -789|53565|   -2|  837|  873|-2884| 2874|  287| 4289|   93| 9927|-7771
|3645|   0| 2335| -756|-890|  34| -65|  -8|  67| 878|-653| 367| 564|  75| -62| -789|99565|   -2|  837|  873|-2884| 2874|  287| 4289|   93| 9927|-9995
}}

yields

99565
{{~Max81
|   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
|   3|   0|   35|   56|  90|  34| -65|  -8|  67| 878| -74| 367| 564|  75| -62| -789|53565|   -2|  837|  873|-2884| 2874|  287| 4289|   93| 9927|-7771
|3645|   0| 2335| -756|-890|  34| -65|  -8|  67| 878|-653| 367| 564|  75| -62| -789|-9565|   -2|  837|  873|-2884| 2874|  287| 4289|   93| 9927|97771
}}

yields

97771

Examples with invalid arguments

{{~Max81|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.

{{~Max81|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!)
{{~Max81
|   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
|   3|   0|   35|   56|  90|  34| -65|  -8|  67| 878| -74| 367| 564|  75| -62| -789|53565|   -2|  837|  873|-2884| 2874|  287| 4289|   93| 9927|-7771
|3645|   0| 2335| -756|-890|  34| -65|  -8|  67| 878|-653| 367| 564|  75| -62| -789|-9565|   -2|  837|  873|-2884| 2874|  287| 4289|   93| 9927|-7771
|99995
}}

yields (the 82 nd argument is ignored!)

77836

Code


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

  Should be used for twenty-eight to eighty-one numbers or mathematical expressions

-->{{~Max9
| {{#if:  {{{1|}}} | {{~Max9|  {{{1|}}} |  {{{2|}}} |  {{{3|}}} |  {{{4|}}} |  {{{5|}}} |  {{{6|}}} |  {{{7|}}} |  {{{8|}}} |  {{{9|}}} }} }} 
| {{#if: {{{10|}}} | {{~Max9| {{{10|}}} | {{{11|}}} | {{{12|}}} | {{{13|}}} | {{{14|}}} | {{{15|}}} | {{{16|}}} | {{{17|}}} | {{{18|}}} }} }} 
| {{#if: {{{19|}}} | {{~Max9| {{{19|}}} | {{{20|}}} | {{{21|}}} | {{{22|}}} | {{{23|}}} | {{{24|}}} | {{{25|}}} | {{{26|}}} | {{{27|}}} }} }}
| {{#if: {{{28|}}} | {{~Max9| {{{28|}}} | {{{29|}}} | {{{30|}}} | {{{31|}}} | {{{32|}}} | {{{33|}}} | {{{34|}}} | {{{35|}}} | {{{36|}}} }} }}
| {{#if: {{{37|}}} | {{~Max9| {{{37|}}} | {{{38|}}} | {{{39|}}} | {{{40|}}} | {{{41|}}} | {{{42|}}} | {{{43|}}} | {{{44|}}} | {{{45|}}} }} }}
| {{#if: {{{46|}}} | {{~Max9| {{{46|}}} | {{{47|}}} | {{{48|}}} | {{{49|}}} | {{{50|}}} | {{{51|}}} | {{{52|}}} | {{{53|}}} | {{{54|}}} }} }}
| {{#if: {{{55|}}} | {{~Max9| {{{55|}}} | {{{56|}}} | {{{57|}}} | {{{58|}}} | {{{59|}}} | {{{60|}}} | {{{61|}}} | {{{62|}}} | {{{63|}}} }} }}
| {{#if: {{{64|}}} | {{~Max9| {{{64|}}} | {{{65|}}} | {{{66|}}} | {{{67|}}} | {{{68|}}} | {{{69|}}} | {{{70|}}} | {{{71|}}} | {{{72|}}} }} }}
| {{#if: {{{73|}}} | {{~Max9| {{{73|}}} | {{{74|}}} | {{{75|}}} | {{{76|}}} | {{{77|}}} | {{{78|}}} | {{{79|}}} | {{{80|}}} | {{{81|}}} }} }}
}}</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)