Property | Value |
---|---|
Hex Value | $1A |
Categories | |
Localizations |
|
min(
Overview
Returns smaller of valueA
and valueB
.
Availability: Token available everywhere.
Syntax
min(valueA,valueB)
Arguments
Name | Type | Optional |
---|---|---|
valueA | ||
valueB |
Location
math, NUM
, 6:min(
Overview
Returns smallest real or complex element in list
.
Availability: Token available everywhere.
Syntax
min(list)
Arguments
Name | Type | Optional |
---|---|---|
list | list |
Location
2nd, list, MATH
, 1:min(
Overview
Returns real or complex list of the smaller of each pair of elements in listA
and listB
.
Availability: Token available everywhere.
Syntax
min(listA,listB)
Arguments
Name | Type | Optional |
---|---|---|
listA | list | |
listB | list |
Location
2nd, list, MATH
, 1:min(
Overview
Returns a real or complex list of the smaller of value
or each list
element.
Availability: Token available everywhere.
Syntax
min(value,list)
Arguments
Name | Type | Optional |
---|---|---|
value | ||
list | list |
Location
2nd, list, MATH
, 1:min(
Description
min(x,y) returns the smallest of the two numbers x and y. min(list) returns the smallest element of list. min(list1,list2) returns the pairwise minima of the two lists. min(list1,x) (equivalently, min(x,list1)) returns a list whose elements are the smaller of x or the corresponding element of the original list.
min(2,3)
2
min({2,3,4})
2
min({1,3},{4,2})
{1 2}
min({1,3},2)
{1 2}
Unlike relational operators, such as < and >, min( can also compare complex numbers. To do this, both arguments must be complex — either complex numbers or complex lists: min(2,𝑖) will throw a ERR:DATA TYPE error even though min(2+0𝑖,𝑖) won't. In the case of complex numbers, the number with the smallest absolute value will be returned. When the two numbers have the same absolute value, the second one will be returned: min(𝑖,-𝑖) returns -𝑖 and min(-𝑖,𝑖) returns 𝑖.
Advanced Uses
min( can be used in Boolean comparisons to see if every value of a list is 1 (true) — useful because commands like If or While only deal with numbers, and not lists, but comparisons like L1=L2 return a list of values. In general, the behavior you want varies, and you will use the min( or max( functions accordingly.
Using min( will give you a strict test — only if every single value of a list is true will min( return true. For example, the following code will test if two lists are identical — they have the same exact elements — and print EQUAL in that case:
:If dim(L1)=dim(L2
:Then
:If min(L1=L2
:Disp "EQUAL
:End
The first check, to see if the sizes are identical, is necessary because otherwise comparing the lists will return a ERR:DIM MISMATCH error.
Error Conditions
- ERR:DATA TYPE is thrown when comparing a real and a complex number. This can be avoided by adding 0𝑖 to the real number.
- ERR:DIM MISMATCH is thrown, when using min( with two lists, if they have different dimensions.
Related Commands
Source: parts of this page were written by the following TI|BD contributors: burr, DarkerLine, GoVegan.
History
Calculator | OS Version | Description |
---|---|---|
TI-82 | 1.0 | Added |