home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD2.img
/
d4xx
/
d472
/
icalc
/
trig.icalc
< prev
next >
Wrap
Text File
|
1991-04-17
|
990b
|
38 lines
# some functions to extend icalc
# MWS, March 24, 1991.
silent # switch off confirmation of definitions
func log(z) = ln(z)/LOG10 # base-10 logarithm
func lg(z) = ln(z)/LOG2 # base-2 logarithm
#minor trig functions
func csc(z) = 1/sin(z)
func sec(z) = 1/cos(z)
func cot(z) = cos(z)/sin(z)
#inverse minor trig functions
func acsc(z) = -i*ln((i+sqrt(sqr(z)-1))/z)
func asec(z) = -i*ln((1+sqrt(1-sqr(z)))/z)
func acot(z) = -0.5*i*ln((z+i)/(z-i))
#inverse hyperbolic trig functions
func asinh(z) = ln(z+sqrt(sqr(z)+1))
func acosh(z) = ln(z+sqrt(sqr(z)-1))
func atanh(z) = 0.5*ln((1+z)/(1-z))
#minor hyperbolic trig functions
func csch(z) = 1/sinh(z)
func sech(z) = 1/cosh(z)
func coth(z) = cosh(z)/sinh(z)
#inverse minor hyperbolic trig functions
func acsch(z) = ln((1+sqrt(1+sqr(z)))/z)
func asech(z) = ln((1+sqrt(1-sqr(z)))/z)
func acoth(z) = 0.5*ln((z+1)/(z-1))
#Stirling's formula
func stirl(n) = sqrt(2*n*PI)*(n/E)^n*(1+1/(12*n))
verbose # restore display of results, messages