Back to index

glibc  2.9
Functions | Variables
s_asinh.c File Reference
#include "math.h"
#include "math_private.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

double __asinh (double x)

Variables

static double one = 1.00000000000000000000e+00
static double ln2 = 6.93147180559945286227e-01
static double huge = 1.00000000000000000000e+300

Function Documentation

double __asinh ( double  x)

Definition at line 43 of file s_asinh.c.

{
       double t,w;
       int32_t hx,ix;
       GET_HIGH_WORD(hx,x);
       ix = hx&0x7fffffff;
       if(ix>=0x7ff00000) return x+x;     /* x is inf or NaN */
       if(ix< 0x3e300000) { /* |x|<2**-28 */
           if(huge+x>one) return x;       /* return x inexact except 0 */
       }
       if(ix>0x41b00000) {  /* |x| > 2**28 */
           w = __ieee754_log(fabs(x))+ln2;
       } else if (ix>0x40000000) { /* 2**28 > |x| > 2.0 */
           t = fabs(x);
           w = __ieee754_log(2.0*t+one/(__ieee754_sqrt(x*x+one)+t));
       } else {             /* 2.0 > |x| > 2**-28 */
           t = x*x;
           w =__log1p(fabs(x)+t/(one+__ieee754_sqrt(one+t)));
       }
       if(hx>0) return w; else return -w;
}

Here is the call graph for this function:


Variable Documentation

double huge = 1.00000000000000000000e+300 [static]

Definition at line 38 of file s_asinh.c.

double ln2 = 6.93147180559945286227e-01 [static]

Definition at line 37 of file s_asinh.c.

double one = 1.00000000000000000000e+00 [static]

Definition at line 36 of file s_asinh.c.