~ubuntu-branches/ubuntu/precise/eglibc/precise

« back to all changes in this revision

Viewing changes to sysdeps/ieee754/ldbl-128/e_jnl.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2011-10-04 17:48:26 UTC
  • mfrom: (216.1.23 oneiric)
  • Revision ID: package-import@ubuntu.com-20111004174826-2cyb9ewn3ucymlsx
Tags: 2.13-20ubuntu5
libc6-dev: Don't break the current {gnat,gcj}-4.4-base versons. LP: #853688.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
/* Modifications for 128-bit long double are
13
13
   Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
14
 
   and are incorporated herein by permission of the author.  The author
 
14
   and are incorporated herein by permission of the author.  The author 
15
15
   reserves the right to distribute this material elsewhere under different
16
 
   copying permissions.  These modifications are distributed here under
 
16
   copying permissions.  These modifications are distributed here under 
17
17
   the following terms:
18
18
 
19
19
    This library is free software; you can redistribute it and/or
59
59
#include "math.h"
60
60
#include "math_private.h"
61
61
 
 
62
#ifdef __STDC__
62
63
static const long double
 
64
#else
 
65
static long double
 
66
#endif
63
67
  invsqrtpi = 5.6418958354775628694807945156077258584405E-1L,
64
68
  two = 2.0e0L,
65
69
  one = 1.0e0L,
66
70
  zero = 0.0L;
67
71
 
68
72
 
 
73
#ifdef __STDC__
69
74
long double
70
75
__ieee754_jnl (int n, long double x)
 
76
#else
 
77
long double
 
78
__ieee754_jnl (n, x)
 
79
     int n;
 
80
     long double x;
 
81
#endif
71
82
{
72
83
  u_int32_t se;
73
84
  int32_t i, ix, sgn;
274
285
                    }
275
286
                }
276
287
            }
277
 
          /* j0() and j1() suffer enormous loss of precision at and
278
 
           * near zero; however, we know that their zero points never
279
 
           * coincide, so just choose the one further away from zero.
280
 
           */
281
 
          z = __ieee754_j0l (x);
282
 
          w = __ieee754_j1l (x);
283
 
          if (fabsl (z) >= fabsl (w))
284
 
            b = (t * z / b);
285
 
          else
286
 
            b = (t * w / a);
 
288
          b = (t * __ieee754_j0l (x) / b);
287
289
        }
288
290
    }
289
291
  if (sgn == 1)
291
293
  else
292
294
    return b;
293
295
}
294
 
strong_alias (__ieee754_jnl, __jnl_finite)
295
296
 
 
297
#ifdef __STDC__
296
298
long double
297
299
__ieee754_ynl (int n, long double x)
 
300
#else
 
301
long double
 
302
__ieee754_ynl (n, x)
 
303
     int n;
 
304
     long double x;
 
305
#endif
298
306
{
299
307
  u_int32_t se;
300
308
  int32_t i, ix;
390
398
  else
391
399
    return -b;
392
400
}
393
 
strong_alias (__ieee754_ynl, __ynl_finite)