Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
e_acosh.c File Reference
#include "fdlibm.h"

Go to the source code of this file.

Functions

double __ieee754_acosh (double x)

Variables

static double one = 1.0
static double ln2 = 6.93147180559945286227e-01

Function Documentation

double __ieee754_acosh ( double  x)

Definition at line 80 of file e_acosh.c.

{      
        fd_twoints u;
       double t;
       int hx;
        u.d = x;
       hx = __HI(u);
       if(hx<0x3ff00000) {         /* x < 1 */
           return (x-x)/(x-x);
       } else if(hx >=0x41b00000) {       /* x > 2**28 */
           if(hx >=0x7ff00000) {   /* x is inf of NaN */
               return x+x;
           } else 
              return __ieee754_log(x)+ln2;       /* acosh(huge)=log(2x) */
       } else if(((hx-0x3ff00000)|__LO(u))==0) {
           return 0.0;                    /* acosh(1) = 0 */
       } else if (hx > 0x40000000) {      /* 2**28 > x > 2 */
           t=x*x;
           return __ieee754_log(2.0*x-one/(x+fd_sqrt(t-one)));
       } else {                    /* 1<x<2 */
           t = x-one;
           return fd_log1p(t+fd_sqrt(2.0*t+t*t));
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

double ln2 = 6.93147180559945286227e-01 [static]

Definition at line 75 of file e_acosh.c.

double one = 1.0 [static]

Definition at line 74 of file e_acosh.c.