(FILECREATED "26-AUG-83 00:37:37" {PHYLUM}<LISPUSERS>MATHFNS.;3 12249 changes to: (VARS MATHFNSCOMS) (FNS LOG10 ANTILOG10 SEC CSC COT ARCSEC ARCCSC ARCCOT SINH SECH COSH CSCH TANH COTH ARCSINH ARCCOSH ARCTANH ARCCSCH ARCSECH ARCCOTH CPLUS CTIMES CQUOTIENT CABS CARG CLOG CANTILOG CEXPT CSQRT CSIN CCOS CTAN CCOT CSEC CCSC CARCSIN CARCCOS CARCTAN CARCCSC CARCSEC CARCCOT CSINH CSECH CCOSH CCSCH CTANH CCOTH CARCSINH CARCCOSH CARCTANH CARCCSCH CARCSECH CARCCOTH) (MACROS CEXP) previous date: "26-AUG-83 00:15:04" {PHYLUM}<LISPUSERS>MATHFNS.;1) (PRETTYCOMPRINT MATHFNSCOMS) (RPAQQ MATHFNSCOMS [(* MATHFNS -- By Kelly Roach *) (FNS LOG10 ANTILOG10) (FNS SEC CSC COT ARCSEC ARCCSC ARCCOT) (FNS SINH SECH COSH CSCH TANH COTH ARCSINH ARCCOSH ARCTANH ARCCSCH ARCSECH ARCCOTH) (FNS CPLUS CTIMES CQUOTIENT CABS CARG CLOG CANTILOG CEXPT CSQRT) (FNS CSIN CCOS CTAN CCOT CSEC CCSC CARCSIN CARCCOS CARCTAN CARCCSC CARCSEC CARCCOT) (FNS CSINH CSECH CCOSH CCSCH CTANH CCOTH CARCSINH CARCCOSH CARCTANH CARCCSCH CARCSECH CARCCOTH) (PROPS (COMPLEXIFY MACRO) (COMPLEX MACRO) (REAL MACRO) (IMAGINARY MACRO) (CONJUGATE MACRO) (CZEROP MACRO) (CMINUS MACRO) (CDIFFERENCE MACRO) (CEXP MACRO) (EXP MACRO)) [CONSTANTS (E 2.718282) (PI 3.141593) (EULER .5772157) (COMPLEX0 (QUOTE (0.0 . 0.0))) (COMPLEX1 (QUOTE (1.0 . 0.0))) (COMPLEX2 (QUOTE (2.0 . 0.0))) (COMPLEXI (QUOTE (0.0 . 1.0))) (COMPLEXM1 (QUOTE (-1.0 . 0.0))) (COMPLEXMI (QUOTE (0.0 . -1.0))) (COMPLEXE (QUOTE (2.718282 . 0.0))) (COMPLEXPI (QUOTE (3.141593 . 0.0] (P (MOVD (QUOTE ANTILOG) (QUOTE EXP)) (MOVD (QUOTE CANTILOG) (QUOTE CEXP))) (DECLARE: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA) (NLAML) (LAMA CTIMES CPLUS]) (* MATHFNS -- By Kelly Roach *) (DEFINEQ (LOG10 [LAMBDA (X) (FQUOTIENT (LOG X) (CONSTANT (LOG 10.0]) (ANTILOG10 [LAMBDA (X) (EXPT 10.0 X]) ) (DEFINEQ (SEC [LAMBDA (X RADIANSFLG) (FQUOTIENT 1.0 (COS X RADIANSFLG]) (CSC [LAMBDA (X RADIANSFLG) (FQUOTIENT 1.0 (SIN X RADIANSFLG]) (COT [LAMBDA (X RADIANSFLG) (FQUOTIENT 1.0 (TAN X RADIANSFLG]) (ARCSEC [LAMBDA (X RADIANSFLG) (* Principle branch. Between 0 & PI/2 or -PI & -PI/2. *) (COND ((NOT (FLESSP X 0.0)) (ARCCOS (FQUOTIENT 1.0 X) RADIANSFLG)) (T (FMINUS (ARCCOS (FQUOTIENT 1.0 X) RADIANSFLG]) (ARCCSC [LAMBDA (X RADIANSFLG) (* Principle branch. Between 0 & PI/2 or -PI & -PI/2. *) (COND ((NOT (FLESSP X 0.0)) (ARCSIN (FQUOTIENT 1.0 X) RADIANSFLG)) (RADIANSFLG (FMINUS (FPLUS (ARCSIN (FQUOTIENT 1.0 X) RADIANSFLG) PI))) (T (FDIFFERENCE (FPLUS (ARCSIN (FQUOTIENT 1.0 X) RADIANSFLG) PI) 180.0]) (ARCCOT [LAMBDA (X RADIANSFLG) (* Principle branch. Between 0 and PI. *) (ARCTAN2 1.0 X RADIANSFLG]) ) (DEFINEQ (SINH [LAMBDA (X) (FQUOTIENT (FDIFFERENCE (ANTILOG X) (ANTILOG (FMINUS X))) 2.0]) (SECH [LAMBDA (X) (FQUOTIENT 2.0 (FPLUS (ANTILOG X) (ANTILOG (FMINUS X]) (COSH [LAMBDA (X) (FQUOTIENT (FPLUS (ANTILOG X) (ANTILOG (FMINUS X))) 2.0]) (CSCH [LAMBDA (X) (FQUOTIENT 2.0 (FDIFFERENCE (ANTILOG X) (ANTILOG (FMINUS X]) (TANH [LAMBDA (X) (FQUOTIENT (FDIFFERENCE 1.0 (ANTILOG (FTIMES -2.0 X))) (FPLUS 1.0 (ANTILOG (FTIMES -2.0 X]) (COTH [LAMBDA (X) (FQUOTIENT (FPLUS 1.0 (ANTILOG (FTIMES -2.0 X))) (FDIFFERENCE 1.0 (ANTILOG (FTIMES -2.0 X]) (ARCSINH [LAMBDA (X) (LOG (FPLUS X (SQRT (FPLUS 1.0 (FTIMES X X]) (ARCCOSH [LAMBDA (X) (LOG (FPLUS X (SQRT (FPLUS -1.0 (FTIMES X X]) (ARCTANH [LAMBDA (X) (FTIMES .5 (LOG (FQUOTIENT (FPLUS 1.0 X) (FDIFFERENCE 1.0 X]) (ARCCSCH [LAMBDA (X) (LOG (FQUOTIENT (FPLUS 1.0 (SQRT (FPLUS (FTIMES X X) 1.0))) X]) (ARCSECH [LAMBDA (X) (LOG (FQUOTIENT [FPLUS 1.0 (SQRT (FDIFFERENCE 1.0 (FTIMES X X] X]) (ARCCOTH [LAMBDA (X) (FTIMES .5 (LOG (FQUOTIENT (FDIFFERENCE X 1.0) (FPLUS 1.0 X]) ) (DEFINEQ (CPLUS [LAMBDA EXPR ([LAMBDA (ZS) (PROG (R I ANSWER) (SETQ R 0.0) (SETQ I 0.0) [for Z in ZS do (SETQ R (FPLUS R (REAL Z))) (SETQ I (FPLUS I (IMAGINARY Z] (SETQ ANSWER (COMPLEX R I)) (RETURN ANSWER] (for I from 1 to EXPR collect (ARG EXPR I]) (CTIMES [LAMBDA EXPR ([LAMBDA (ZS) (PROG (R I NEWR ANSWER) (SETQ R 1.0) (SETQ I 0.0) (for Z in ZS do [SETQ NEWR (FDIFFERENCE (FTIMES R (REAL Z)) (FTIMES I (IMAGINARY Z] [SETQ I (FPLUS (FTIMES R (IMAGINARY Z)) (FTIMES I (REAL Z] (SETQ R NEWR)) (SETQ ANSWER (COMPLEX R I)) (RETURN ANSWER] (for I from 1 to EXPR collect (ARG EXPR I]) (CQUOTIENT [LAMBDA (Z1 Z2) (PROG (R ANSWER) (SETQ R (CABS Z2)) (SETQ ANSWER (CTIMES Z1 (CONJUGATE Z2))) (change (REAL ANSWER) (FQUOTIENT (REAL ANSWER) R)) (change (IMAGINARY ANSWER) (FQUOTIENT (IMAGINARY ANSWER) R)) (RETURN ANSWER]) (CABS [LAMBDA (Z) (SQRT (FPLUS (FTIMES (REAL Z) (REAL Z)) (FTIMES (IMAGINARY Z) (IMAGINARY Z]) (CARG [LAMBDA (Z) (* Principle branch between 0 and 2PI. (RADIANSFLG would be a bad idea here) . *) (PROG (ANSWER) (SETQ ANSWER (ARCTAN2 (IMAGINARY Z) (REAL Z) T)) [COND ((FLESSP ANSWER 0.0) (SETQ ANSWER (FPLUS ANSWER (CONSTANT (FTIMES 2.0 PI] (RETURN ANSWER]) (CLOG [LAMBDA (Z) (* Returns principle branch. *) (COMPLEX (LOG (CABS Z)) (CARG Z]) (CANTILOG [LAMBDA (Z) (PROG (EX ANSWER) (SETQ EX (ANTILOG (REAL Z))) [SETQ ANSWER (COMPLEX (FTIMES EX (COS (IMAGINARY Z) T)) (FTIMES EX (SIN (IMAGINARY Z) T] (RETURN ANSWER]) (CEXPT [LAMBDA (Z1 Z2) (CANTILOG (CTIMES Z2 (CLOG Z1]) (CSQRT [LAMBDA (Z) (CANTILOG (CTIMES (CONSTANT (COMPLEX .5 0.0)) (CLOG Z]) ) (DEFINEQ (CSIN [LAMBDA (Z) (PROG (IZ MIZ ANSWER) (SETQ IZ (COMPLEX (FMINUS (IMAGINARY Z)) (REAL Z))) [SETQ MIZ (COMPLEX (IMAGINARY Z) (FMINUS (REAL Z] [SETQ ANSWER (CQUOTIENT (CDIFFERENCE (CANTILOG IZ) (CANTILOG MIZ)) (CONSTANT (COMPLEX 0.0 2.0] (RETURN ANSWER]) (CCOS [LAMBDA (Z) (PROG (IZ MIZ ANSWER) (SETQ IZ (COMPLEX (FMINUS (IMAGINARY Z)) (REAL Z))) [SETQ MIZ (COMPLEX (IMAGINARY Z) (FMINUS (REAL Z] [SETQ ANSWER (CQUOTIENT (CDIFFERENCE (CANTILOG IZ) (CANTILOG MIZ)) (CONSTANT (COMPLEX 0.0 2.0] (RETURN ANSWER]) (CTAN [LAMBDA (Z) (CQUOTIENT (CCOS Z) (CSIN Z]) (CCOT [LAMBDA (Z) (CQUOTIENT (CSIN Z) (CCOS Z]) (CSEC [LAMBDA (Z) (CQUOTIENT COMPLEX1 (CCOS Z]) (CCSC [LAMBDA (Z) (CQUOTIENT COMPLEX1 (CSIN Z]) (CARCSIN [LAMBDA (Z) (CTIMES COMPLEXMI (CLOG (CPLUS (CTIMES COMPLEXI Z) (CSQRT (CDIFFERENCE COMPLEX1 (CTIMES Z Z]) (CARCCOS [LAMBDA (Z) (CTIMES COMPLEXMI (CLOG (CPLUS Z (CSQRT (CDIFFERENCE (CTIMES Z Z) COMPLEX1]) (CARCTAN [LAMBDA (Z) (CTIMES (CONSTANT (COMPLEX 0.0 -.5)) (CLOG (CQUOTIENT (CPLUS COMPLEX1 (CTIMES COMPLEXI Z)) (CDIFFERENCE COMPLEX1 (CTIMES COMPLEXI Z]) (CARCCSC [LAMBDA (Z) (CTIMES COMPLEXMI (CLOG (CQUOTIENT (CPLUS COMPLEXI (CSQRT (CDIFFERENCE (CTIMES Z Z) COMPLEX1))) Z]) (CARCSEC [LAMBDA (Z) (CTIMES COMPLEXMI (CLOG (CQUOTIENT [CPLUS COMPLEX1 (CSQRT (CDIFFERENCE COMPLEX1 (CTIMES Z Z] Z]) (CARCCOT [LAMBDA (Z) (CTIMES (CONSTANT (COMPLEX 0.0 -.5)) (CLOG (CQUOTIENT (CPLUS Z COMPLEXI) (CDIFFERENCE Z COMPLEXI]) ) (DEFINEQ (CSINH [LAMBDA (Z) (CQUOTIENT (CDIFFERENCE (CANTILOG Z) (CANTILOG (CMINUS Z))) COMPLEX2]) (CSECH [LAMBDA (Z) (CQUOTIENT COMPLEX2 (CPLUS (CANTILOG Z) (CANTILOG (CMINUS Z]) (CCOSH [LAMBDA (Z) (CQUOTIENT (CPLUS (CANTILOG Z) (CANTILOG (CMINUS Z))) COMPLEX2]) (CCSCH [LAMBDA (Z) (CQUOTIENT COMPLEX2 (CDIFFERENCE (CANTILOG Z) (CANTILOG (CMINUS Z]) (CTANH [LAMBDA (Z) (CQUOTIENT (CDIFFERENCE COMPLEX1 (CANTILOG (CTIMES (CONSTANT (COMPLEX -2.0 0.0)) Z))) (CPLUS COMPLEX1 (CANTILOG (CTIMES (CONSTANT (COMPLEX -2.0 0.0)) Z]) (CCOTH [LAMBDA (Z) (CQUOTIENT (CPLUS COMPLEX1 (CANTILOG (CTIMES (CONSTANT (COMPLEX -2.0 0.0)) Z))) (CDIFFERENCE COMPLEX1 (CANTILOG (CTIMES (CONSTANT (COMPLEX -2.0 0.0)) Z]) (CARCSINH [LAMBDA (Z) (CLOG (CPLUS Z (SQRT (CPLUS COMPLEX1 (CTIMES Z Z]) (CARCCOSH [LAMBDA (Z) (CLOG (CPLUS Z (SQRT (CDIFFERENCE (CTIMES Z Z) COMPLEX1]) (CARCTANH [LAMBDA (Z) (CTIMES (CONSTANT (COMPLEX .5 0.0)) (CLOG (CQUOTIENT (CPLUS COMPLEX1 Z) (CDIFFERENCE COMPLEX1 Z]) (CARCCSCH [LAMBDA (Z) (CLOG (CQUOTIENT (CPLUS COMPLEX1 (SQRT (CPLUS (CTIMES Z Z) COMPLEX1))) Z]) (CARCSECH [LAMBDA (Z) (CLOG (CQUOTIENT [CPLUS COMPLEX1 (SQRT (CDIFFERENCE COMPLEX1 (CTIMES Z Z] Z]) (CARCCOTH [LAMBDA (Z) (CTIMES (CONSTANT (COMPLEX .5 0.0)) (CLOG (CQUOTIENT (CDIFFERENCE Z COMPLEX1) (CPLUS COMPLEX1 Z]) ) (PUTPROPS COMPLEXIFY MACRO ((R) (CONS R 0.0))) (PUTPROPS COMPLEX MACRO ((R I) (CONS R I))) (PUTPROPS REAL MACRO ((Z) (CAR Z))) (PUTPROPS IMAGINARY MACRO ((Z) (CDR Z))) (PUTPROPS CONJUGATE MACRO [(Z) (CONS (CAR Z) (FMINUS (CDR Z]) (PUTPROPS CZEROP MACRO ((Z) (EQUAL Z COMPLEX0))) (PUTPROPS CMINUS MACRO [(Z) (COMPLEX (FMINUS (REAL Z)) (FMINUS (IMAGINARY Z]) (PUTPROPS CDIFFERENCE MACRO [(Z1 Z2) (COMPLEX (FDIFFERENCE (REAL Z1) (REAL Z2)) (FDIFFERENCE (IMAGINARY Z1) (IMAGINARY Z2]) (PUTPROPS CEXP MACRO ((X) (CANTILOG X))) (PUTPROPS EXP MACRO ((X) (ANTILOG X))) (DECLARE: EVAL@COMPILE (RPAQQ E 2.718282) (RPAQQ PI 3.141593) (RPAQQ EULER .5772157) (RPAQQ COMPLEX0 (0.0 . 0.0)) (RPAQQ COMPLEX1 (1.0 . 0.0)) (RPAQQ COMPLEX2 (2.0 . 0.0)) (RPAQQ COMPLEXI (0.0 . 1.0)) (RPAQQ COMPLEXM1 (-1.0 . 0.0)) (RPAQQ COMPLEXMI (0.0 . -1.0)) (RPAQQ COMPLEXE (2.718282 . 0.0)) (RPAQQ COMPLEXPI (3.141593 . 0.0)) [CONSTANTS (E 2.718282) (PI 3.141593) (EULER .5772157) (COMPLEX0 (QUOTE (0.0 . 0.0))) (COMPLEX1 (QUOTE (1.0 . 0.0))) (COMPLEX2 (QUOTE (2.0 . 0.0))) (COMPLEXI (QUOTE (0.0 . 1.0))) (COMPLEXM1 (QUOTE (-1.0 . 0.0))) (COMPLEXMI (QUOTE (0.0 . -1.0))) (COMPLEXE (QUOTE (2.718282 . 0.0))) (COMPLEXPI (QUOTE (3.141593 . 0.0] ) (MOVD (QUOTE ANTILOG) (QUOTE EXP)) (MOVD (QUOTE CANTILOG) (QUOTE CEXP)) (DECLARE: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDTOVAR NLAMA ) (ADDTOVAR NLAML ) (ADDTOVAR LAMA CTIMES CPLUS) ) (DECLARE: DONTCOPY (FILEMAP (NIL (2058 2196 (LOG10 2068 . 2145) (ANTILOG10 2147 . 2194)) (2197 3311 (SEC 2207 . 2279) ( CSC 2281 . 2353) (COT 2355 . 2427) (ARCSEC 2429 . 2718) (ARCCSC 2720 . 3141) (ARCCOT 3143 . 3309)) ( 3312 4553 (SINH 3322 . 3428) (SECH 3430 . 3517) (COSH 3519 . 3620) (CSCH 3622 . 3714) (TANH 3716 . 3843) (COTH 3845 . 3972) (ARCSINH 3974 . 4049) (ARCCOSH 4051 . 4127) (ARCTANH 4129 . 4231) (ARCCSCH 4233 . 4342) (ARCSECH 4344 . 4447) (ARCCOTH 4449 . 4551)) (4554 6755 (CPLUS 4564 . 4894) (CTIMES 4896 . 5337) (CQUOTIENT 5339 . 5671) (CABS 5673 . 5788) (CARG 5790 . 6177) (CLOG 6179 . 6337) (CANTILOG 6339 . 6569) (CEXPT 6571 . 6647) (CSQRT 6649 . 6753)) (6756 8758 (CSIN 6766 . 7114) (CCOS 7116 . 7464) (CTAN 7466 . 7543) (CCOT 7545 . 7622) (CSEC 7624 . 7689) (CCSC 7691 . 7756) (CARCSIN 7758 . 7913) ( CARCCOS 7915 . 8050) (CARCTAN 8052 . 8253) (CARCCSC 8255 . 8432) (CARCSEC 8434 . 8596) (CARCCOT 8598 . 8756)) (8759 10543 (CSINH 8769 . 8895) (CSECH 8897 . 9013) (CCOSH 9015 . 9140) (CCSCH 9142 . 9259) (CTANH 9261 . 9495) (CCOTH 9497 . 9731) (CARCSINH 9733 . 9831) (CARCCOSH 9833 . 9944) (CARCTANH 9946 . 10104) (CARCCSCH 10106 . 10247) (CARCSECH 10249 . 10381) (CARCCOTH 10383 . 10541))))) STOP