Numeric Expressions
In evaluating numeric expressions,
TI
BASIC uses the
standard
rules for mathematical hierarchy.
These
rules
are
outlined here.
I,
All expressions within
parentheses
are
evaluated first
according to the hierarchical rules.
2.
Exponentiation
is
performed
next
in
order
from
left
to
right.
3. Prefix plus
and
minus
are
performed.
-t. M
ultiphcations
and
divisions
are
then
completed.
5. Additions and subtractions
are
then completed.
Note
that
01\0
is defined to be I as in ordinary mathematical
usage.
In the evaluation of a numeric expression if
an
underflow
occurs,
the value
is
simply replaced by zero and the program continues
running.
If
an
overflowoccUfS
in the evaluation of a numeric
expression, the value
is
replaced
by
the computer's limit, a
warning condition is indicated by the message "WARNING:
NUMBER
TOO
BIG." and the program continues running.
When evaluation of a numeric expression results
10
divIsion by zero.
the value
is
replaced
by
the computer's limit with the same sign as
the numerator. the message "WARNING:
NUMBER
TOO BIG"
is
displayed,
and
the program continues running.
If
the evaluation of
the operation of exponentiation results
in
zero being raised to a
negative power, the value
is
replaced
by
the positive value of the
computer's limit, the message 'WARNING:
NUMBER
TOO BIG"
is
displayed,
and
the program continues running.
If
the evaluation
of
the operation of exponentiation results in a negative number
being raised to a nonĀ·integral power, the message "BAD VALUE"
is
displayed,
and
the program stops running.
User's
Reference
Guide
Examples;
>NEW
>100
A=2
>110
B=3
>120
C=4
>130 PRINT A*(B+2)
>140 PRINT BIIA-4
>1,0
PRHH
-ellA;
(-C)IIA
>160
PRINT
10-B*C/6
>170
END
>RUN
1U
5.
-16
16
8
**
DONE
**
>PRINT
OliO
1
>NEW
>100
PRINT
l~-ZOO
>110 PRINT
24+1E-139
>120 PRINT 1E171
>130 PRINT
(1E60*1E76)/1E50
>140
tND
>RUN
o
24
*
wARNING:
NUMBER
TOO
BIG
IN
120
9.99999E+**
*
wARNING:
NUMBER
TOO
BIG
IN
130
1.E+78
**
DONE
**
>NEW
>100 PRINT
-22/0
>110 PRINT
011-2
>120 PRINT
(-3)/11.2
>130
END
>RUN
*
wARNING:
NUMBER
TOO
BIG
IN
100
-9.99999E+**
*
WARNING:
NUMBER
TOO
BIG
IN
110
9.99999E+**
*
BAD
VALUE
IN
120
IIĀ·l3