Reference Guide
Full Command and Function Reference 3-179
Input/Output:
Level 1/Argument 1 Level 1/Item 1
“global”
→
See also: PROMPT, STO
PROOT
Type: Command
Description: Polynomial Roots Command: Returns all roots of an n-degree polynomial having real or complex
coefficients.
For an n
th
-order polynomial, the argument must be a real or complex array of length n
+ 1
containing the coefficients listed from highest order to lowest. The result is a real or complex
vector of length n containing the computed roots.
PROOT interprets leading coefficients of zero in a limiting sense. As a leading coefficient
approaches zero, a root of the polynomial approaches infinity: therefore, if flag –22 is clear (the
default), PROOT reports an Infinite Result error if a leading coefficient is zero. If flag –22 is set,
PROOT returns a root of (MAXREAL,0) for each leading zero in an array containing real
coefficients, and a root of (MAXREAL,MAXREAL) for each leading zero in an array containing
complex coefficients.
Access: !Þ
POLYNOMIAL
LL
PROOT
(Þis the left-shift of the 1key).
Flags: Infinite Result Exception (–22)
Input/Output:
Level 1/Argument 1 Level 1/Item 1
[ array ]
coefficients
→
[ array ]
roots
Example: Find the roots of the polynomial x
4
+ 2x
3
- 25x
2
- 26x + 120:
Command:
[ 1 2 –25 –26 120 ] PROOT
Result:
[ 2 –3 4 –5 ]
See also: PCOEF, PEVAL
PROPFRAC
Type: Command
Description: Toggles between an improper fraction and its corresponding integer and fractional part.
Access: P
ARITH
or Arithmetic, !ÞL
Input: An improper fraction, or an object that evaluates to an improper fraction. It must not contain real
numbers. Alternately, the input may be an integer part plus a proper fraction.
Output: An integer part plus a proper fraction; or alternately, if the input was an integer part plus a proper
fraction, an improper fraction.
Flags: Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example: Express the following as a proper fraction:
x
3
4+
x
2
--------------
Command:
PROPFRAC((X^3+4)/X^2))
Result:
X+(4/X^2)