Back to index

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

Go to the source code of this file.

Functions

float __ieee754_acoshf (float x)

Variables

static float one = 1.0
static float ln2 = 6.9314718246e-01

Function Documentation

float __ieee754_acoshf ( float  x)

Definition at line 34 of file e_acoshf.c.

{      
       float t;
       int32_t hx;
       GET_FLOAT_WORD(hx,x);
       if(hx<0x3f800000) {         /* x < 1 */
           return (x-x)/(x-x);
       } else if(hx >=0x4d800000) {       /* x > 2**28 */
           if(hx >=0x7f800000) {   /* x is inf of NaN */
               return x+x;
           } else 
              return __ieee754_logf(x)+ln2;      /* acosh(huge)=log(2x) */
       } else if (hx==0x3f800000) {
           return 0.0;                    /* acosh(1) = 0 */
       } else if (hx > 0x40000000) {      /* 2**28 > x > 2 */
           t=x*x;
           return __ieee754_logf((float)2.0*x-one/(x+__ieee754_sqrtf(t-one)));
       } else {                    /* 1<x<2 */
           t = x-one;
           return __log1pf(t+__sqrtf((float)2.0*t+t*t));
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

float ln2 = 6.9314718246e-01 [static]

Definition at line 29 of file e_acoshf.c.

float one = 1.0 [static]

Definition at line 28 of file e_acoshf.c.