e_jn.c (97409) | e_jn.c (97413) |
---|---|
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[] = "$FreeBSD: head/lib/msun/src/e_jn.c 97409 2002-05-28 17:51:46Z alfred $"; | 14static char rcsid[] = "$FreeBSD: head/lib/msun/src/e_jn.c 97413 2002-05-28 18:15:04Z alfred $"; |
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: --- 22 unchanged lines hidden (view full) --- 45 46static const double 47invsqrtpi= 5.64189583547756279280e-01, /* 0x3FE20DD7, 0x50429B6D */ 48two = 2.00000000000000000000e+00, /* 0x40000000, 0x00000000 */ 49one = 1.00000000000000000000e+00; /* 0x3FF00000, 0x00000000 */ 50 51static const double zero = 0.00000000000000000000e+00; 52 | 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: --- 22 unchanged lines hidden (view full) --- 45 46static const double 47invsqrtpi= 5.64189583547756279280e-01, /* 0x3FE20DD7, 0x50429B6D */ 48two = 2.00000000000000000000e+00, /* 0x40000000, 0x00000000 */ 49one = 1.00000000000000000000e+00; /* 0x3FF00000, 0x00000000 */ 50 51static const double zero = 0.00000000000000000000e+00; 52 |
53 double __ieee754_jn(int n, double x) | 53double 54__ieee754_jn(int n, double x) |
54{ 55 int32_t i,hx,ix,lx, sgn; 56 double a, b, temp, di; 57 double z, w; 58 59 /* J(-n,x) = (-1)^n * J(n, x), J(n, -x) = (-1)^n * J(n, x) 60 * Thus, J(-n,x) = J(n,-x) 61 */ --- 138 unchanged lines hidden (view full) --- 200 } 201 } 202 b = (t*__ieee754_j0(x)/b); 203 } 204 } 205 if(sgn==1) return -b; else return b; 206} 207 | 55{ 56 int32_t i,hx,ix,lx, sgn; 57 double a, b, temp, di; 58 double z, w; 59 60 /* J(-n,x) = (-1)^n * J(n, x), J(n, -x) = (-1)^n * J(n, x) 61 * Thus, J(-n,x) = J(n,-x) 62 */ --- 138 unchanged lines hidden (view full) --- 201 } 202 } 203 b = (t*__ieee754_j0(x)/b); 204 } 205 } 206 if(sgn==1) return -b; else return b; 207} 208 |
208 double __ieee754_yn(int n, double x) | 209double 210__ieee754_yn(int n, double x) |
209{ 210 int32_t i,hx,ix,lx; 211 int32_t sign; 212 double a, b, temp; 213 214 EXTRACT_WORDS(hx,lx,x); 215 ix = 0x7fffffff&hx; 216 /* if Y(n,NaN) is NaN */ --- 47 unchanged lines hidden --- | 211{ 212 int32_t i,hx,ix,lx; 213 int32_t sign; 214 double a, b, temp; 215 216 EXTRACT_WORDS(hx,lx,x); 217 ix = 0x7fffffff&hx; 218 /* if Y(n,NaN) is NaN */ --- 47 unchanged lines hidden --- |