|
We're glad you came by, but you might find what you're looking for elsewhere. TI-Basic Developer is not the site it once was. While its information on commands and other calculator features remains almost second-to-none, its forum, archives, and even hosting service, Wikidot, have been decaying for years. The calculator community would love to see what you're working on, or help you in your next coding adventure, but TI-Basic Developer is no longer the place to do it. Instead, you should head over to Cemetech (primarily American) or TI-Planet (primarily international). Both are active, well-established forums with their own archives, chatrooms, reference material, and abundant coding tools and resources. We'll see you there, we hope. |
Finds the lowest numerical value from arguements
min(arg1,[arg2])
Menu Location
This command can't be found in any menu besides the command catalog.
This command works on all calculators.
X
The min() Command can be executed in two different ways.
It can find the lowest of two numbers:
min(0,1)
//returns 0It can find the lowest number in a list:
min({0,1,2})
//returns 0Advanced Uses
For advanced users, the min command can also have its two arguments replaced with lists, as long as the two lists have the same dimensions and only include numbers. min(list,list) returns a list, with min having been done on each pair of items, as is the custom for lists in functions.
min({123},{321})
//returns {1,2,1}It also works in much the same way for matrices.
min([[1,2,3][1,2,3]],[[3,2,1][3,2,1]])
//returns [[1,2,1][1,2,1]]Optimization
If comparing two numbers, it is slightly faster to compare the two as two arguments than to have them in a list.
:min({1,2})
can be
:min(1,2)The first example takes 13 seconds for 1000 repetitions, while the second takes only 9. When using the min command repetitively, this will add up.
