TI-BASIC:Math

From Learn @ Cemetech
Jump to navigationJump to search

Calculators are built with one primary purpose: math. Programming, game playing, and everything else is secondary. Thus, you will find a number of powerful math commands. Although it may seem that they are of no use to a programmer, programs sometimes need math functions, and many math functions can be used in clever ways. In this guide we'll group the commands into the following general groups:

Number Operations

These commands deal with different ways you can manipulate the integer and fraction parts of a number, and are mostly found in the MATH-NUM menu.

Probability and Combinatorics

These commands are generally found in the MATH-PRB menu (except for RandM(, which is in the MATRIX-MATH menu). They include commands for generating random numbers, and commands that are useful for solving problems in combinatorics and probability theory.

Calculus

Although the TI-83 series calculators don't, by themselves, have the capability for symbolic calculations, these commands (found in the main MATH menu) can provide numerical approximations for some commonly computed quantities in calculus.

  • FMin(, FMax( -- numerical function optimization in one variable.
  • NDeriv(, FnInt( -- derivatives and integrals.
  • Solve( -- numerical solution of an equation in one variable.

Trigonometry

These commands allow you to manipulate angles, and are generally affected by Radian_Mode and Degree_Mode (so you should check those pages out). Some of these commands live in the 2nd ANGLE menu, some are on the keyboard, and some can only be found in the 2nd CATALOG menu:

Complex Number Operations

These commands are used for dealing with complex numbers, and are found in the MATH-CPX menu. Many other math commands work on complex numbers too, and complex numbers are fairly strongly connected to trigonometry.

Operators

These commands are found on the keyboard and in the 2nd TEST menu, and deal with basic mathematical and logical commands.

Powers, Inverses, Exponentials, and Logarithms

These commands are found all over the place, many on the keyboard itself, and deal with raising some value to a power, or raising a number to some value, or the inverses of those operations.

Miscellaneous

These commands have nothing to do with each other, but don't really belong to other categories either.

  • π, e -- famous (and occasionally, even useful) math constants.
  • Min(, Max( -- returns the smaller number(s) or the larger number(s).
  • Lcm(, Gcd( -- returns the least common multiple or the greatest common denominator of two numbers.

Comments

Note that the Statistics commands are not included here. That is because statistics is not math. There is also the Finance commands and variables, which are another topic unto themselves.

In addition, all of the above commands, except for the calculus and random number generating commands, can be applied to Lists as well. For single-argument commands, this just means that the command is applied to each element of the list separately.

For multiple-argument commands, there are two ways to do it: with a number and a list (then, the command is applied with that number to each element of a list), and with two lists (then, it's done pairwise, and the lists must be the same size, otherwise the calculator will throw a ERR:DIM MISMATCH error).