MATHFNS By Kelly Roach. Mathematical functions not already provided by Interlisp. Last revised: Aug 27, 1983.MATHFNS (and .DCOM) contain functions from mathematics that are not alreadyprovided by Interlisp, including extra trigonometric functions, hyperbolic functions, and macros andfunctions for complex arithmetic. Gamma, Bessel, Error, and other special functions are planned.NEW CONSTANTS The following constants are defined.E = 2.718282EULER = .5772157PI = 3.141593EXTRA LOGARITHMS AND EXPONENTIATIONThe following functions are made availble in addition to LOG and EXPT provided by Interlisp.(EXP X)E to the power of X. The same as (ANTILOG X).(LOG2 X)Same as (LOG X 2.0).(LOG10 X)Same as (LOG X 10.0).EXTRA TRIGONOMETRIC FUNCTIONSThe following functions are made available inaddition to SIN, COS, TAN, ARCSIN,ARCCOS, ARCTAN, and ARCTAN2 provided by Interlisp.(SEC X RADIANSFLG)(CSC X RADIANSFLG)(COT X RADIANSFLG)(ARCSEC X RADIANSFLG)(ARCCSC X RADIANSFLG)(ARCCOT X RADIANSFLG)HYPERBOLIC FUNCTIONSThe hyperbolic functions are set up similar to the trigonometric functions except that there isno RADIANSFLG. All angles are in radians.(SINH X)(SECH X)(COSH X)(CSCH X)(TANH X)(COTH X)(ARCSINH X)(ARCCOSH X)(ARCTANH X)(ARCCSCH X)(ARCSECH X)(ARCCOTH X)COMPLEX ARITHMETIC.Complex numbers are implemented as CONS cells. The CAR is the real part and the CDR isÿî ·ïbpôî ·ï`šqôXðgî ·ï]’pqpqð9î ·ï\ðdî ·ïZŠðaî ·ïW�p î ·ïTyqð)î ·ïQq î ·ïOíî ·ïNi î ·ïKapð#î­ïHYqð\î ·ïEQî­ïCÍð.î ·ïBIî­ï@Åî ·ï?Aî­ï=¼î ·ï:´pî­ï7¬qðOî ·ï6(ð2î ·ï3 î ·ï1œî ·ï0î ·ï.”î ·ï-î ·ï+Œî ·ï(„pî­ï%|qð_î ·ï#øð*î ·ï ïî ·ïkî ·ïçî ·ïcî ·ïßî ·ï[î ·ï× î ·ïS î ·ïÏ î ·ïK î ·ïÇ î ·ïC î ·ï ;pî­ï 3qðWd · ì<æYL¹2the imaginary part. Macros COMPLEX, REAL, IMAGINARY, and COMPLEXIFY are the best wayto assemble and take apart complex numbers.To keep things speedy, no coercion of real numbers to complex numbers or vice verca isattempted. The user must be sure to supply only complex numbers to functions which take complexargs.COMPLEX0 = (0.0 . 0.0)Complex number 0.COMPLEX1 = (1.0 . 0.0)Complex number 1.COMPLEXI = (0.0 . 1.0)Complex number I. The square root of -1.COMPLEXE = (2.718282 . 0.0)COMPLEXPI = (3.141593 . 0.0)(COMPLEX R I)Returns complex number with real part R and imaginary part I.(REAL Z)Returns real part of a complex number.(IMAGINARY Z)Returns imaginary part of a complex number.(COMPLEXIFY R)Returns complex number with real part R and imaginary part 0.0. The same as (COMPLEX R0.0).(CONJUGATE Z)Returns complex conjugate of Z.(CZEROP Z)Predicate tests if complex Z is complex 0.(CMINUS Z)(CDIFFERENCE Z1 Z2)(CPLUS Z1 Z2 ... Zn)(CTIMES Z1 Z2 ... Zn)(CQUOTIENT Z1 Z2)(CABS Z)Returns real absolute value of Z.(CARG Z)Returns real argument of complex Z.(CLOG Z)Complex natural logarithm of complex Z.(CEXP Z)Complex E to the power of Z. Same as (CANTILOG Z).(CSQRT Z)Complex square root of complex Z.COMPLEX TRIGONOMETRIC FUNCTIONS.There is no RADIANSFLG arg to any of the complex trigonometric functions. All angles arein radians.(CSIN Z)(CCOS Z)(CTAN Z)(CCOT Z)(CSEC Z)(CCSC Z)(CARCSIN Z)(CARCCOS Z)(CARCTAN Z)(CARCCSC Z)(CARCSEC Z)îN°ïfñqî ·ïbôXðUî ·ï`šð+î­ï_ðVî ·ï]’ð`î ·ï\î ·ïYî­ïW�î ·ïUýî­ïTyî ·ïRõî­ïQqð)î ·ïOíî ·ïNiî ·ïLå î­ïKað=î ·ïIÝî­ïHYð&î ·ïFÕ î­ïEQð+î ·ïCÍ î­ïBIðWî ·ï@Åî ·ï?A î­ï=¼î ·ï<8 î­ï:´ð*î ·ï90 î ·ï7¬î ·ï6(î ·ï4¤î ·ï3 î ·ï1œî­ï0ð!î ·ï.”î­ï-ð#î ·ï+Œî­ï*ð'î ·ï(„î­ï'ð3î ·ï%|î­ï#øð!î ·ï ïpî­ïçqðYî ·ïc î ·ï[î ·ï×î ·ïSî ·ïÏî ·ïKî ·ïÇî ·ïC î ·ï¿ î ·ï ; î ·ï · î ·ï 3 ¤ · ì<Ä^Û3(CARCCOT Z)COMPLEX HYPERBOLIC FUNCTIONS.There is no RADIANSFLG arg to any of the complex hyperbolic functions. All angles are inradians.(CSINH Z)(CSECH Z)(CCOSH Z)(CCSCH Z)(CTANH Z)(CCOTH Z)(CARCSINH Z)(CARCCOSH Z)(CARCTANH Z)(CARCCSCH Z)(CARCSECH Z)(CARCCOTH Z)PLANS AND COMMENTS.Functions GAMMA, BETA, ERF, EI, SI, CI, FRESNELSIN, FRESNELCOS, BESSELJ,BESSELY, BESSELI, BESSELK, HANKLE1, HANKLE2, BER, BEI, KER, and KEI are on their way.A small set of extra number theoretic functions are also planned. If you have implemented aworthwhile function or have a better implementation of any of the functions I'm providing in thispackage, send it to me and I'll see that it gets in.ÿîN°ïfñqî ·ïbôX î ·ï_pî­ï\qðYî ·ïZŠî ·ïW�î ·ïUýî ·ïTyî ·ïRõî ·ïQqî ·ïOíî ·ïNi î ·ïLå î ·ïKa î ·ïIÝ î ·ïHY î ·ïFÕ î ·ïCÍpî­ï@ÅqðHî ·ï?AðUî ·ï=¼ð\î ·ï<8ðaî ·ï:´ð4ÿª ·:m=„-žd TIMESROMAN  TIMESROMAN G%œ ÿÿj/ ›yv´ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ MATHFNS.BRAVOROACHAugust 28, 1983 8:32 PM