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.0L
static long double ln2 = 6.93147180559945286227e-01L

Function Documentation

long double __ieee754_acoshl ( long double  x)

Definition at line 45 of file e_acoshl.c.

{
       long double t;
       int64_t hx;
       u_int64_t lx;
       GET_LDOUBLE_WORDS64(hx,lx,x);
       if(hx<0x3ff0000000000000LL) {             /* x < 1 */
           return (x-x)/(x-x);
       } else if(hx >=0x41b0000000000000LL) {    /* x > 2**28 */
           if(hx >=0x7ff0000000000000LL) {       /* x is inf of NaN */
               return x+x;
           } else
              return __ieee754_logl(x)+ln2;      /* acosh(huge)=log(2x) */
       } else if (((hx-0x3ff0000000000000LL)|(lx&0x7fffffffffffffffLL))==0) {
           return 0.0;                    /* acosh(1) = 0 */
       } else if (hx > 0x4000000000000000LL) {   /* 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 __log1p(t+__sqrtl(2.0*t+t*t));
       }
}

Here is the call graph for this function:


Variable Documentation

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

Definition at line 40 of file e_acoshl.c.

long double one = 1.0L [static]

Definition at line 39 of file e_acoshl.c.