Reference Guide

4-2 Computer Algebra System
Many CAS commands will give numeric results instead of symbolic results if numeric mode is set instead of
being cleared. Though these results may be correct, they will not be what the user wants if a symbolic result
is needed. For this reason, the Flags section of most operation descriptions says that numeric mode should
not be set.
If approximate mode is set instead of exact mode, CAS commands will often give reasonable results, but
unexpected results can be obtained, because, for example, powers are real numbers, not integers, for
instance a cube will be treated as x
3.0
instead of x
3
. For this reason, the Flags section of most operation
descriptions says that exact mode should be set. Some commands, like the numeric solvers, will only find
approximate solutions if approximate mode is set.
CAS operations are designed to work with integers if possible, and some CAS operations round their inputs
before using them. FIX 0 mode will round to whole numbers, losing accuracy. STD mode will retain full
accuracy, so it is the best display mode to use with the CAS and is used in most of the examples in this
chapter.
For the same reasons, the general solutions, symbolic constants and symbolic arguments flags (flags –1, –2
and –3) should normally be clear when working with the CAS.
Where possible, integer numbers should be used as input, not real numbers. The functions RND, CEIL and
FLOOR can round a real number to a whole real number, and RI will convert a whole real number to an
integer.
If complex inputs are given, approximate mode may need to be set to find solutions, and complex mode
must be set (flag –103 set).
Not only the trigonometry rewriting operations, but some other CAS operations require the angle mode to
be set to radians (flag –17 clear), even if it is not immediately obvious that this is so. For this reason, the
Flags section of many operation descriptions says that radians mode should be set.
Some CAS operations will work one step at a time if step-by-step mode is set (flag –100 set). If a result is
wanted immediately, and the calculator instead displays one step of the operation, cancel the operation, clear
flag –100, then repeat the operation.
If a mode needs to be changed for an operation to work, the calculator will by default ask if the mode can
be changed. If the Silent mode switch flag (flag –120) is set, the calculator changes the mode without asking.
If the mode switch disallowed flag (flag –123) is set, the mode will not be changed and an error will occur.
All the system flags from –99 to –128 are intended for use by the CAS. It is worth reading Appendix C in
the User’s Guide to learn the detailed effects of these flags on CAS operations and displays.
Remember that in RPN mode, symbolic expressions typed on the command line should be enclosed in
single quote marks x + y. For clarity, it can be helpful to type expressions in single quote marks in
Algebraic mode too.
It is important to write symbolic expressions using the current variable. Some CAS operations will work
with this variable, but treat other variables simply as unknown numbers. If an expression has been entered
using a variable other than the current variable, it may be simpler to change the current variable in the CAS
MODES form, rather than rewrite the whole expression.
In algebraic mode (flag –95 set), some CAS commands will replace variables with their numeric values
before returning a result, even if “argument to symbolic” mode is set (flag –3 clear). In RPN mode, they will
be returned as variables. Some other CAS commands will always replace variables with their numeric results.
Because of the above, variables used in symbolic operations should not have the same names as variables
stored in the current directory/folder (or in directories above this directory). If, for example, x is the current
variable, and a variable called x exists in the current directory or in the HOME directory, then the value
stored in x might be used instead of the symbolic variable x.
The modulo value used in modulus calculations is 13 after the calculator is reset. If the CAS modes are reset
with CASCFG, the modulo is also 13, but if the modes are reset using
!RESET
as above, the modulo is 3,
otherwise it is the value most recently set. It is important to change this to the required value before carrying
out any modulus operations.