Annotation of gforth/engine/atanh.c, revision 1.1

1.1     ! anton       1: /* replacement for asinh, acosh, and atanh */
        !             2: 
        !             3: #include <math.h>
        !             4: 
        !             5: double atanh(double r1)
        !             6: {
        !             7:   double r2=r1 < 0 ? -r1 : r1;
        !             8:   double r3=log((r2/(1.0-r2)*2)+1)/2;
        !             9: 
        !            10:   return r1 < 0 ? -r3 : r3;
        !            11:   /* fdup f0< >r fabs 1. d>f fover f- f/  f2* flnp1 f2/
        !            12:      r> IF  fnegate  THEN ;
        !            13:      */
        !            14: }
        !            15: 
        !            16: double asinh(double r1)
        !            17: {
        !            18:   return atanh(r1/sqrt(1.0+r1*r1));
        !            19:   /* fdup fdup f* 1. d>f f+ fsqrt f/ fatanh ; */
        !            20: }
        !            21: 
        !            22: double acosh(double r1)
        !            23: {
        !            24:   return(log(r1+sqrt(r1*r1-1.0)));
        !            25:   /* fdup fdup f* 1. d>f f- fsqrt f+ fln ; */
        !            26: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>