Back to index

glibc  2.9
Functions | Variables
s_asinhl.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

long double __asinhl (long double x)

Variables

static long double one = 1.0L
static long double ln2 = 6.931471805599453094172321214581765681e-1L
static long double huge = 1.0e+4900L

Function Documentation

long double __asinhl ( long double  x)

Definition at line 49 of file s_asinhl.c.

{
  long double t, w;
  int32_t ix, sign;
  ieee854_long_double_shape_type u;

  u.value = x;
  sign = u.parts32.w0;
  ix = sign & 0x7fffffff;
  if (ix == 0x7fff0000)
    return x + x;           /* x is inf or NaN */
  if (ix < 0x3fc70000)
    {                       /* |x| < 2^ -56 */
      if (huge + x > one)
       return x;            /* return x inexact except 0 */
    }
  u.parts32.w0 = ix;
  if (ix > 0x40350000)
    {                       /* |x| > 2 ^ 54 */
      w = __ieee754_logl (u.value) + ln2;
    }
  else if (ix >0x40000000)
    {                       /* 2^ 54 > |x| > 2.0 */
      t = u.value;
      w = __ieee754_logl (2.0 * t + one / (__ieee754_sqrtl (x * x + one) + t));
    }
  else
    {                       /* 2.0 > |x| > 2 ^ -56 */
      t = x * x;
      w = __log1pl (u.value + t / (one + __ieee754_sqrtl (one + t)));
    }
  if (sign & 0x80000000)
    return -w;
  else
    return w;
}

Here is the call graph for this function:


Variable Documentation

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

Definition at line 42 of file s_asinhl.c.

long double ln2 = 6.931471805599453094172321214581765681e-1L [static]

Definition at line 41 of file s_asinhl.c.

long double one = 1.0L [static]

Definition at line 40 of file s_asinhl.c.