184 Appendix A: Functions and Instructions
Exit CATALOG
Exit
Exits the current For, While, or Loop block.
Exit is not allowed outside the three looping
structures (
For, While, or Loop).
Program listing:
:0! temp
:For i,1,100,1
: temp+i! temp
: If temp>20
: Exit
:EndFor
:Disp temp
Contents of temp after execution: 21
exp4list() CATALOG
exp4list(
expression
,
var
) ⇒
list
Examines
expression
for equations that are
separated by the word “or,” and returns a list
containing the right-hand sides of the equations
of the form
var=expression
. This gives you an easy
way to extract some solution values embedded in
the results of the
solve(), cSolve(), fMin(), and
fMax() functions.
Note:
exp4list() is not necessary with the zeros
and cZeros() functions because they return a list
of solution values directly.
solve(x^2ì xì 2=0,x) ¸ x=2 or
x=ë 1
exp4list(solve(x^2ì xì 2=0,x),x)
¸
{ë 1 2}
expand() MATH/Algebra menu
expand(
expression1
[,
var
]) ⇒
expression
expand(
list1
[
,var
]) ⇒
list
expand(
matrix1
[
,var
]) ⇒
matrix
expand(
expression1
) returns
expression1
expanded with respect to all its variables. The
expansion is polynomial expansion for
polynomials and partial fraction expansion for
rational expressions.
The goal of
expand() is to transform
expression1
into a sum and/or difference of simple terms. In
contrast, the goal of
factor() is to transform
expression1
into a product and/or quotient of
simple factors.
expand((x+y+1)^2) ¸
xñ +
2ø xø y + 2ø x + yñ + 2ø y + 1
expand((x^2ì x+y^2ì y)/(x^2ù y^2
ì x^2ù yì xù y^2+xù y))
¸
expand(
expression1,var
) returns
expression
expanded with respect to
var
. Similar powers of
var
are collected. The terms and their factors are
sorted with
var
as the main variable. There might
be some incidental factoring or expansion of the
collected coefficients. Compared to omitting
var
,
this often saves time, memory, and screen space,
while making the expression more
comprehensible.
expand((x+y+1)^2,y) ¸
yñ +
2ø yø (x + 1) + (x + 1)ñ
expand((x+y+1)^2,x)
¸
xñ +
2ø xø (y + 1) + (y + 1)ñ
expand((x^2ì x+y^2ì y)/(x^2ù y^2
ì x^2ù yì xù y^2+xù y),y)
¸
expand(ans(1),x) ¸