Deleted Added
full compact
e_jn.c (2117) e_jn.c (7658)
1/* @(#)e_jn.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_jn.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[] = "$Id: e_jn.c,v 1.6 1994/08/18 23:05:37 jtc Exp $";
14static char rcsid[] = "$Id: e_jn.c,v 1.1.1.1 1994/08/19 09:39:44 jkh Exp $";
15#endif
16
17/*
18 * __ieee754_jn(n, x), __ieee754_yn(n, x)
19 * floating point Bessel's function of the 1st and 2nd kind
20 * of order n
21 *
22 * Special cases:

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

233 ix = 0x7fffffff&hx;
234 /* if Y(n,NaN) is NaN */
235 if((ix|((u_int32_t)(lx|-lx))>>31)>0x7ff00000) return x+x;
236 if((ix|lx)==0) return -one/zero;
237 if(hx<0) return zero/zero;
238 sign = 1;
239 if(n<0){
240 n = -n;
15#endif
16
17/*
18 * __ieee754_jn(n, x), __ieee754_yn(n, x)
19 * floating point Bessel's function of the 1st and 2nd kind
20 * of order n
21 *
22 * Special cases:

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

233 ix = 0x7fffffff&hx;
234 /* if Y(n,NaN) is NaN */
235 if((ix|((u_int32_t)(lx|-lx))>>31)>0x7ff00000) return x+x;
236 if((ix|lx)==0) return -one/zero;
237 if(hx<0) return zero/zero;
238 sign = 1;
239 if(n<0){
240 n = -n;
241 sign = 1 - ((n&1)<<2);
241 sign = 1 - ((n&1)<<1);
242 }
243 if(n==0) return(__ieee754_y0(x));
244 if(n==1) return(sign*__ieee754_y1(x));
245 if(ix==0x7ff00000) return zero;
246 if(ix>=0x52D00000) { /* x > 2**302 */
247 /* (x >> n**2)
248 * Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi)
249 * Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi)

--- 32 unchanged lines hidden ---
242 }
243 if(n==0) return(__ieee754_y0(x));
244 if(n==1) return(sign*__ieee754_y1(x));
245 if(ix==0x7ff00000) return zero;
246 if(ix>=0x52D00000) { /* x > 2**302 */
247 /* (x >> n**2)
248 * Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi)
249 * Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi)

--- 32 unchanged lines hidden ---