Back to index

glibc  2.9
Functions | Variables
e_acoshl.c File Reference
#include "math.h"
#include "math_private.h"

Go to the source code of this file.

Functions

long double __ieee754_acoshl (long double x)

Variables

static long double one = 1.0
static long double ln2 = 6.931471805599453094287e-01L

Function Documentation

long double __ieee754_acoshl ( long double  x)

Definition at line 49 of file e_acoshl.c.

{
       long double t;
       u_int32_t se,i0,i1;
       GET_LDOUBLE_WORDS(se,i0,i1,x);
       if(se<0x3fff || se & 0x8000) {     /* x < 1 */
           return (x-x)/(x-x);
       } else if(se >=0x401d) {    /* x > 2**30 */
           if(se >=0x7fff) {              /* x is inf of NaN */
               return x+x;
           } else
              return __ieee754_logl(x)+ln2;      /* acoshl(huge)=logl(2x) */
       } else if(((se-0x3fff)|i0|i1)==0) {
           return 0.0;                    /* acosh(1) = 0 */
       } else if (se > 0x4000) {   /* 2**28 > x > 2 */
           t=x*x;
           return __ieee754_logl(2.0*x-one/(x+__ieee754_sqrtl(t-one)));
       } else {                    /* 1<x<2 */
           t = x-one;
           return __log1pl(t+__sqrtl(2.0*t+t*t));
       }
}

Here is the call graph for this function:


Variable Documentation

long double ln2 = 6.931471805599453094287e-01L [static]

Definition at line 44 of file e_acoshl.c.

long double one = 1.0 [static]

Definition at line 43 of file e_acoshl.c.