[6.34] Error Function For Real Arguments - Texas Instruments TI-89 Tip List

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

Advertisement

if x=0:return 0
if x<0:return ⁻spfn\si(⁻x)
if x>Πthen
Œ/2-(((polyeval({1,0,38.027264,0,265.187033,0,335.677320,0,38.102495},x))/(polye
val({1,0,40.021433,0,322.624911,0,570.23628,0,157.105423},x)))/(x)*cos(x)+(polye
val({1,0,42.242855,0,302.757865,0,352.018498,0,21.821899},x)/polyeval({1,0,48.19
6927,0,482.485984,0,1114.978885,0,449.690326},x))/(x^2)*sin(x))
elseif x>.01 then
nint(sin(z)/z,z,0,x)
else
polyeval({⁻2.2774643986765⁻9,0,3.0619243582207⁻7,0,⁻2.8344671201814⁻5,0,1.666
6666666667⁻3,0,⁻.055555555555556,0,1,0},x)
endif
EndFunc
Code listing for ci(x):
ci(x)
Func
©(x) return ci(x), x real, |x|<112
©Must be in folder \spfn
©23jan01/dburkett@infinet.com
if x=0:return undef
if x<0:return spfn\ci(⁻x)+*Œ
if x>Πthen
(((polyeval({1,0,38.027264,0,265.187033,0,335.677320,0,38.102495},x))/(polyeval(
{1,0,40.021433,0,322.624911,0,570.23628,0,157.105423},x)))/(x))*sin(x)-((polyeva
l({1,0,42.242855,0,302.757865,0,352.018498,0,21.821899},x)/polyeval({1,0,48.1969
27,0,482.485984,0,1114.978885,0,449.690326},x))/(x^2))*cos(x)
elseif x>.01 then
nint((cos(t)-1)/t,t,0,x)+ln(x)+.57721566490153
else
ln(x)+.57721566490153+polyeval({3.100198412698⁻6,0,⁻2.3148148148148⁻4,0,.01041
6666666667,0,⁻.25,0,0},x)
endif
EndFunc
(Thanks to Bhuvanesh for providing test data.)

[6.34] Error function for real arguments

The error function is one of many so-called 'special functions'. It is defined as
6 - 64

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92+

Table of Contents