Deleted Added
full compact
e_j0.c (97409) e_j0.c (97413)
1/* @(#)e_j0.c 5.1 93/09/24 */
2/*
3 * ====================================================
4 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
5 *
6 * Developed at SunPro, a Sun Microsystems, Inc. business.
7 * Permission to use, copy, modify, and distribute this
8 * software is freely granted, provided that this notice
9 * is preserved.
10 * ====================================================
11 */
12
13#ifndef lint
1/* @(#)e_j0.c 5.1 93/09/24 */
2/*
3 * ====================================================
4 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
5 *
6 * Developed at SunPro, a Sun Microsystems, Inc. business.
7 * Permission to use, copy, modify, and distribute this
8 * software is freely granted, provided that this notice
9 * is preserved.
10 * ====================================================
11 */
12
13#ifndef lint
14static char rcsid[] = "$FreeBSD: head/lib/msun/src/e_j0.c 97409 2002-05-28 17:51:46Z alfred $";
14static char rcsid[] = "$FreeBSD: head/lib/msun/src/e_j0.c 97413 2002-05-28 18:15:04Z alfred $";
15#endif
16
17/* __ieee754_j0(x), __ieee754_y0(x)
18 * Bessel function of the first and second kinds of order zero.
19 * Method -- j0(x):
20 * 1. For tiny x, we use j0(x) = 1 - x^2/4 + x^4/64 - ...
21 * 2. Reduce x to |x| since j0(x)=j0(-x), and
22 * for x in (0,2)

--- 53 unchanged lines hidden (view full) ---

76R05 = -4.61832688532103189199e-09, /* 0xBE33D5E7, 0x73D63FCE */
77S01 = 1.56191029464890010492e-02, /* 0x3F8FFCE8, 0x82C8C2A4 */
78S02 = 1.16926784663337450260e-04, /* 0x3F1EA6D2, 0xDD57DBF4 */
79S03 = 5.13546550207318111446e-07, /* 0x3EA13B54, 0xCE84D5A9 */
80S04 = 1.16614003333790000205e-09; /* 0x3E1408BC, 0xF4745D8F */
81
82static const double zero = 0.0;
83
15#endif
16
17/* __ieee754_j0(x), __ieee754_y0(x)
18 * Bessel function of the first and second kinds of order zero.
19 * Method -- j0(x):
20 * 1. For tiny x, we use j0(x) = 1 - x^2/4 + x^4/64 - ...
21 * 2. Reduce x to |x| since j0(x)=j0(-x), and
22 * for x in (0,2)

--- 53 unchanged lines hidden (view full) ---

76R05 = -4.61832688532103189199e-09, /* 0xBE33D5E7, 0x73D63FCE */
77S01 = 1.56191029464890010492e-02, /* 0x3F8FFCE8, 0x82C8C2A4 */
78S02 = 1.16926784663337450260e-04, /* 0x3F1EA6D2, 0xDD57DBF4 */
79S03 = 5.13546550207318111446e-07, /* 0x3EA13B54, 0xCE84D5A9 */
80S04 = 1.16614003333790000205e-09; /* 0x3E1408BC, 0xF4745D8F */
81
82static const double zero = 0.0;
83
84 double __ieee754_j0(double x)
84double
85__ieee754_j0(double x)
85{
86 double z, s,c,ss,cc,r,u,v;
87 int32_t hx,ix;
88
89 GET_HIGH_WORD(hx,x);
90 ix = hx&0x7fffffff;
91 if(ix>=0x7ff00000) return one/(x*x);
92 x = fabs(x);

--- 43 unchanged lines hidden (view full) ---

136u04 = -3.81407053724364161125e-06, /* 0xBECFFEA7, 0x73D25CAD */
137u05 = 1.95590137035022920206e-08, /* 0x3E550057, 0x3B4EABD4 */
138u06 = -3.98205194132103398453e-11, /* 0xBDC5E43D, 0x693FB3C8 */
139v01 = 1.27304834834123699328e-02, /* 0x3F8A1270, 0x91C9C71A */
140v02 = 7.60068627350353253702e-05, /* 0x3F13ECBB, 0xF578C6C1 */
141v03 = 2.59150851840457805467e-07, /* 0x3E91642D, 0x7FF202FD */
142v04 = 4.41110311332675467403e-10; /* 0x3DFE5018, 0x3BD6D9EF */
143
86{
87 double z, s,c,ss,cc,r,u,v;
88 int32_t hx,ix;
89
90 GET_HIGH_WORD(hx,x);
91 ix = hx&0x7fffffff;
92 if(ix>=0x7ff00000) return one/(x*x);
93 x = fabs(x);

--- 43 unchanged lines hidden (view full) ---

137u04 = -3.81407053724364161125e-06, /* 0xBECFFEA7, 0x73D25CAD */
138u05 = 1.95590137035022920206e-08, /* 0x3E550057, 0x3B4EABD4 */
139u06 = -3.98205194132103398453e-11, /* 0xBDC5E43D, 0x693FB3C8 */
140v01 = 1.27304834834123699328e-02, /* 0x3F8A1270, 0x91C9C71A */
141v02 = 7.60068627350353253702e-05, /* 0x3F13ECBB, 0xF578C6C1 */
142v03 = 2.59150851840457805467e-07, /* 0x3E91642D, 0x7FF202FD */
143v04 = 4.41110311332675467403e-10; /* 0x3DFE5018, 0x3BD6D9EF */
144
144 double __ieee754_y0(double x)
145double
146__ieee754_y0(double x)
145{
146 double z, s,c,ss,cc,u,v;
147 int32_t hx,ix,lx;
148
149 EXTRACT_WORDS(hx,lx,x);
150 ix = 0x7fffffff&hx;
151 /* Y0(NaN) is NaN, y0(-inf) is Nan, y0(inf) is 0 */
152 if(ix>=0x7ff00000) return one/(x+x*x);

--- 227 unchanged lines hidden ---
147{
148 double z, s,c,ss,cc,u,v;
149 int32_t hx,ix,lx;
150
151 EXTRACT_WORDS(hx,lx,x);
152 ix = 0x7fffffff&hx;
153 /* Y0(NaN) is NaN, y0(-inf) is Nan, y0(inf) is 0 */
154 if(ix>=0x7ff00000) return one/(x+x*x);

--- 227 unchanged lines hidden ---