TI-BASIC:Remainder

From Learn @ Cemetech
Revision as of 18:19, 24 February 2016 by Maintenance script (talk | contribs) (Initial automated import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Remainder.gif

Command Summary

Same as modulus - divides a number, but returns the remainder.

Command Syntax

remainder(dividend,divisor)

Menu Location

Press:

  1. MATH to enter the Math menu
  2. Use arrows to go to the NUM menu
  3. 0 to choose remainder(, or use arrows

Calculator Compatibility

TI-84+SE with TI-OS 2.53 MP

Token Size

2 byte

The remainder( function divides the first number given by the second number, and returns the remainder similar to the modulus. This command is only available if you have the TI-84+ Silver Edition and the new 2.53 MP operating system on your calculator. This command can be used both on the Home screen and when programming.

See the code segment below for an example:

remainder(30,7)

This returns a value of 2 because 30 divided by 7 has a remainder of 2.

Compatability

As said earlier this command only works on a TI-84+ Silver Edition with the 2.53 MP OS, so this will not work on earlier OSes. To avoid non-portability, use the following code.

BfPart(A/B

instead of

remainder(A,B

Fpart is a command that works in more OSes and more models. They also are the same size (5 bytes), as long as B is one byte

Error Conditions

  • ERR:DIVIDE BY 0 occurs if you try to input 0 as the divisor.
  • ERR:DOMAIN occurs if the divisor or dividend is either negative or less than 0
  • ERR:SYNTAX occurs if the divisor or dividend is a symbol, or character or non-real number
  • ERR:DATA TYPE occurs if the divisor or dividend is not a number, (i.e. text)

Related Commands