Back to index

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

Go to the source code of this file.

Functions

long double __asinhl (long double x)

Variables

static long double one = 1.000000000000000000000e+00L
static long double ln2 = 6.931471805599453094287e-01L
static long double huge = 1.000000000000000000e+4900L

Function Documentation

long double __asinhl ( long double  x)

Definition at line 47 of file s_asinhl.c.

{
       long double t,w;
       int32_t hx,ix;
       GET_LDOUBLE_EXP(hx,x);
       ix = hx&0x7fff;
       if(ix==0x7fff) return x+x;  /* x is inf or NaN */
       if(ix< 0x3fde) {     /* |x|<2**-34 */
           if(huge+x>one) return x;       /* return x inexact except 0 */
       }
       if(ix>0x4020) {             /* |x| > 2**34 */
           w = __ieee754_logl(fabsl(x))+ln2;
       } else if (ix>0x4000) {     /* 2**34 > |x| > 2.0 */
           t = fabsl(x);
           w = __ieee754_logl(2.0*t+one/(__ieee754_sqrtl(x*x+one)+t));
       } else {             /* 2.0 > |x| > 2**-28 */
           t = x*x;
           w =__log1pl(fabsl(x)+t/(one+__ieee754_sqrtl(one+t)));
       }
       if(hx&0x8000) return -w; else return w;
}

Here is the call graph for this function:


Variable Documentation

long double huge = 1.000000000000000000e+4900L [static]

Definition at line 42 of file s_asinhl.c.

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

Definition at line 41 of file s_asinhl.c.

long double one = 1.000000000000000000000e+00L [static]

Definition at line 40 of file s_asinhl.c.