Back to index

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

Go to the source code of this file.

Functions

float __asinhf (float x)

Variables

static float one = 1.0000000000e+00
static float ln2 = 6.9314718246e-01
static float huge = 1.0000000000e+30

Function Documentation

float __asinhf ( float  x)

Definition at line 35 of file s_asinhf.c.

{
       float t,w;
       int32_t hx,ix;
       GET_FLOAT_WORD(hx,x);
       ix = hx&0x7fffffff;
       if(ix>=0x7f800000) return x+x;     /* x is inf or NaN */
       if(ix< 0x38000000) { /* |x|<2**-14 */
           if(huge+x>one) return x;       /* return x inexact except 0 */
       }
       if(ix>0x47000000) {  /* |x| > 2**14 */
           w = __ieee754_logf(fabsf(x))+ln2;
       } else if (ix>0x40000000) { /* 2**14 > |x| > 2.0 */
           t = fabsf(x);
           w = __ieee754_logf((float)2.0*t+one/(__ieee754_sqrtf(x*x+one)+t));
       } else {             /* 2.0 > |x| > 2**-14 */
           t = x*x;
           w =__log1pf(fabsf(x)+t/(one+__ieee754_sqrtf(one+t)));
       }
       if(hx>0) return w; else return -w;
}

Here is the call graph for this function:


Variable Documentation

float huge = 1.0000000000e+30 [static]

Definition at line 30 of file s_asinhf.c.

float ln2 = 6.9314718246e-01 [static]

Definition at line 29 of file s_asinhf.c.

float one = 1.0000000000e+00 [static]

Definition at line 28 of file s_asinhf.c.