s = 5493.68334077
t = -2422.15013853
u = 425.883370029
So, to find x when y = 1.5, with a relative error of 1E-8, the function call looks like this:
fipoly(fclist,fglist,1.5,1E-8,"rel")
which returns x = 2.6627...
Using the same test cases as in tip [11.5], the table below shows the execution times and errors in x
for various maximum y error limits, for both the relative and absolute error conditions.
1.83
1.77
5.84 E-10
5.84 E-10
1 E-12
1.45
1.41
5.84 E-10
6.67 E-10
1 E-11
1.43
1.38
6.67 E-10
6.67 E-10
1 E-10
1.33
1.30
6.67 E-10
6.67 E-10
1 E-9
1.32
1.27
1.35 E-8
1.35 E-8
1 E-8
1.30
1.23
3.21 E-7
2.82 E-6
1 E-7
1.20
1.16
3.19 E-6
3.19 E-6
1 E-6
1.15
1.12
1.74 E-5
1.74 E-5
1 E-5
0.99
0.95
6.96 E-4
6.96 E-4
1 E-4
0.92
0.90
6.56 E-3
6.56 E-3
1 E-3
0.71
0.70
3.03 E-2
3.03 E-2
1 E-2
0.72
0.70
3.03 E-2
3.03 E-2
1 E-1
"rel" mean
execution time,
sec
"abs" mean
execution time,
sec
"rel" max x-error
"abs" max x-error
yemax
There is little point to setting the error tolerance to less than 1E-12, since the 89/92+ only use 14
significant digits for floating point numbers and calculations. For this function, we don't gain much by
setting the error limit to less than 1E-9.
Note that this program is much faster than using nsolve(): compare these execution times of about 1.3
seconds, to those of about 4 seconds in tip [11.5].
The code is straightforward. The variable nm is the maximum number of iterations that fipoly() will
execute to try to find a solution. It is set to 30, but this is higher than needed in almost all cases. If
Newton's method can find an answer at all, it can find it very quickly. However, I set nm to 30 so that it
will be more likely to return a solution if a poor estimating function is used.
I use separate loops to handle the relative and absolute error cases, because this runs a little faster
than using a single loop and testing for the type of error each loop pass.
[6.13] Find coefficients of determination for all regression equations
The 89/92+ can fit 10 regression equations, but do not find the coeffcient of determination r
2
for all the
equations. However, r
2
is defined for any regression equation, and these two functions calculate it:
r2coef(lx,ly)
func
©Find coefficient of determination r^2, no adjustment for DOF
©lx is list of x-data points
©ly is list of y-data points
©24 nov 99/[email protected]
1
-sum((regeq(lx)-ly)^2)/sum((ly-mean(ly))^2)
6 - 17
Summary of Contents for TI-92+
Page 52: ...Component side of PCB GraphLink I O connector detail 1 41...
Page 53: ...LCD connector detail PCB switch side 1 42...
Page 54: ...Key pad sheet contact side Key pad sheet key side 1 43...
Page 55: ...Key cap detail 1 44...
Page 57: ...Component side of PCB with shield removed A detail view of the intergrated circuits 1 46...
Page 410: ...void extensionroutine2 void Credit to Bhuvanesh Bhatt 10 4...