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 = 0.6931471805599453094172321214581766L

Function Documentation

long double __ieee754_acoshl ( long double  x)

Definition at line 44 of file e_acoshl.c.

{
       long double t;
       u_int64_t lx;
       int64_t hx;
       GET_LDOUBLE_WORDS64(hx,lx,x);
       if(hx<0x3fff000000000000LL) {             /* x < 1 */
           return (x-x)/(x-x);
       } else if(hx >=0x4035000000000000LL) {    /* x > 2**54 */
           if(hx >=0x7fff000000000000LL) {       /* x is inf of NaN */
               return x+x;
           } else
              return __ieee754_logl(x)+ln2;      /* acoshl(huge)=logl(2x) */
       } else if(((hx-0x3fff000000000000LL)|lx)==0) {
           return 0.0L;                   /* acosh(1) = 0 */
       } else if (hx > 0x4000000000000000LL) {   /* 2**28 > x > 2 */
           t=x*x;
           return __ieee754_logl(2.0L*x-one/(x+__ieee754_sqrtl(t-one)));
       } else {                    /* 1<x<2 */
           t = x-one;
           return __log1pl(t+__sqrtl(2.0L*t+t*t));
       }
}

Here is the call graph for this function:


Variable Documentation

long double ln2 = 0.6931471805599453094172321214581766L [static]

Definition at line 39 of file e_acoshl.c.

long double one = 1.0 [static]

Definition at line 38 of file e_acoshl.c.