[6.18] Use Ipart() And Int() Effectively; [6.19] Sub-Divide Integration Range To Improve Accuracy - Texas Instruments TI-89 Tip List

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

©By Doug Burkett & anonymous poster
©Angle a1 is returned in format dd.mmsss, 12.345678 = 12°34'56.78"
©Assumes angle 'a1' is degrees if angle mode is Degree, or radians if the mode
is Radian.
if getmode("angle")="RADIAN":a1*57.295779513082→a1
ipart(a1)+.01*(ipart(60*fpart(a1)))+.006*fpart(60*fpart(a1))
Endfunc
In summary:
dms() converts an angle in DMS format to degrees in Degree mode, or radians in Radian mode.
dmsi() converts an angle to DMS format. The angle is assumed to be degrees in Degree mode, and
radians in Radian mode.

[6.18] Use iPart() and int() effectively

iPart() and int() return the same results for positive numbers, but operate differently for negative
numbers. Remember that int() is identical to floor(), so it returns the greatest integer that is less than or
equal to the argument. So,
int(4.2) = iPart(4.2) = 4
but
int(-4.2) = -5
If you are trying to find the integer part of any number, use iPart().

[6.19] Sub-divide integration range to improve accuracy

You can improve the accuracy of numerical integration by taking advantage of the fact that the 89/92+
numerical integrator is more accurate over small intervals. For example, consider this function:
1
Q(x) =
2✜
x
This is actually the integral for the the complement of the cumulative normal probability distribution
function. If you just integrate this function as shown, for x = 1,
1/(√(2·Œ))·á(ℯ^(-t^2/2),t,1,∞) = 0.1586 5525 3456 96
which has an error of about 4.745E-10. To get a more accurate result, find integrals over smaller
ranges that cover the entire integration limits range, and sum these to get the complete integral. The
table below shows the individual integrals for some ranges I chose.
and
2
− t
2 dt
e
iPart(-4.2) = -4
6 - 22

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92+

Table of Contents