We find the function values at the solutions with
y1({-4.217E17, -141.81969643465, 0})
which returns (approximately)
{1.67879E38, 1E9, -6.494E22}
These values may not seem 'close' to zero, still, they may be the best roots as defined above. The first
step is to test each root. Command-line and TI Basic calculations on the TI-89 / TI-92 Plus are
performed with a 14-digit mantissa, so we need to find the value of e for each root. If a root is
expressed in scientific notation as a.bEc, where a.b is the mantissa, a is not equal to 0 and c is the
exponent, then e = 10^(c-13). For example, for the first root of -4.217E17, e = 10^(17 - 13) = 1E4. The
table below shows the verification results for all three roots.
-6.494E22-6.494E220
-3E97E9-141.8196 9643 465
1.946E39-1.610E39-4.217E17
y1(x+e)y1(x-e)root
Since the signs of y1(x-e) and y1(x+e) are different for the first two roots, they are at least plausible.
However, the third root of zero fails the test. To verify that zero is not a root, we plot the function over
the range of x = -200 to x = 200:
The graph shows the root at about x = -141.8, but x = 0 is clearly not a root.
The sign test is automated with the following function proot_t1(). The arguments are the list of
polynomial coefficients and a list of at least one root, and it returns a list of boolean true and false
results: true if the corresponding root passes the sign test, and false if it fails.
proot_t1(c,r)
Func
©(coefList,rootList)
©Sign test for polynomial roots
©Calls math\mantexp()
©14jun02/dburkett@infinet.com
local i,o,e
{}→o © Initialize result list
for i,1,dim(r) © Loop to test each root
10^(math\mantexp(r[i])[2]-13)→e © Find least significant digit
© Test passes if f(x)=0, or f(x-e), f(x+e) have opposite sign or are zero
polyeval(c,r[i])=0 or polyeval(c,r[i]-e)*polyeval(c,r[i]+e)≤0→o[i]
endfor
return o
EndFunc
6 - 117