EasyManuals Logo

Texas Instruments TI-92+ User Manual

Texas Instruments TI-92+
507 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #278 background imageLoading...
Page #278 background image
©Set Complex format to Rectangular
©12may02/dburkett@infinet.com
local m,roots,eps,maxm,i,j,jj,ad,x,b,c,root
©------------------------------------------------------------
© Define local function to find 1 root with Laguerre'e method
Define root(a,x)=Func
©({coeffs},guess) polynomial root
©NOTE: {a} is reversed!
local m,maxit,mr,mt,epss,iter,j,abx,abp,abm,err,frac,dx,x1,b,d,f,g,h,sq,gp,gm,g2
dim(a)-1→m © Find order of polynomial
2⁻12epss © Set estimated fractional error
8mr © Set number of fractional values to break limit cycles
10mt © Set number of steps to break limit cycle
mt*mrmaxit © Maximum number of iterations
{.5,.25,.75,.13,.38,.62,.88,1.}frac © Fractions used to break limit cycle
for iter,1,maxit © Loop to find a root
a[m+1]b
abs(b)err
0d
0f
abs(x)abx
for j,m,1,⁻1 © Evaluate the polynomial and first two derivatives
x*f+df
x*d+bd
x*b+a[j]b
abs(b)+abx*errerr
endfor
epss*errerr © Estimate roundoff error in polynomial evaluation
if abs(b)err then © Return root if error condition met
return x
else © Execute Laguerre's method
d/bg
g^2g2
g2-2.*f/bh
((m-1)*(m*h-g2))sq
g+sqgp
g-sqgm
abs(gp)abp
abs(gm)abm
if abp < abm: gmgp
if max(abp,abm)>0 then
m/gpdx
else
^(ln(1+abx)+iter*)dx
endif
endif
x-dxx1
if x=x1:return x © Converged to root
if mod(iter,mt)0 then © Every mt steps take a fractional step to break (rare) limit cycle
x1→x
else
x-dx*frac[iter/mt]x
endif
endfor
return "polyroot too many its" © May have this error for complex roots
EndFunc
©-----------------------------------------------------------
© Begin polyroot()
dim(a)-1→m © Find order of polynomial
6 - 120

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-92+ and is the answer not in the manual?

Texas Instruments TI-92+ Specifications

General IconGeneral
BrandTexas Instruments
ModelTI-92+
CategoryCalculator
LanguageEnglish

Related product manuals