e_j0.c (279856) | e_j0.c (283032) |
---|---|
1 2/* @(#)e_j0.c 1.3 95/01/18 */ 3/* 4 * ==================================================== 5 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 6 * 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 * Permission to use, copy, modify, and distribute this 9 * software is freely granted, provided that this notice 10 * is preserved. 11 * ==================================================== 12 */ 13 14#include <sys/cdefs.h> | 1 2/* @(#)e_j0.c 1.3 95/01/18 */ 3/* 4 * ==================================================== 5 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 6 * 7 * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 * Permission to use, copy, modify, and distribute this 9 * software is freely granted, provided that this notice 10 * is preserved. 11 * ==================================================== 12 */ 13 14#include <sys/cdefs.h> |
15__FBSDID("$FreeBSD: head/lib/msun/src/e_j0.c 279856 2015-03-10 17:10:54Z kargl $"); | 15__FBSDID("$FreeBSD: head/lib/msun/src/e_j0.c 283032 2015-05-17 16:27:06Z kargl $"); |
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) 23 * j0(x) = 1-z/4+ z^2*R0/S0, where z = x*x; --- 33 unchanged lines hidden (view full) --- 57 * where x0 = x-pi/4. It is better to compute sin(x0),cos(x0) 58 * by the method mentioned above. 59 * 3. Special cases: y0(0)=-inf, y0(x<0)=NaN, y0(inf)=0. 60 */ 61 62#include "math.h" 63#include "math_private.h" 64 | 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) 23 * j0(x) = 1-z/4+ z^2*R0/S0, where z = x*x; --- 33 unchanged lines hidden (view full) --- 57 * where x0 = x-pi/4. It is better to compute sin(x0),cos(x0) 58 * by the method mentioned above. 59 * 3. Special cases: y0(0)=-inf, y0(x<0)=NaN, y0(inf)=0. 60 */ 61 62#include "math.h" 63#include "math_private.h" 64 |
65static double pzero(double), qzero(double); | 65static __inline double pzero(double), qzero(double); |
66 67static const volatile double vone = 1, vzero = 0; 68 69static const double 70huge = 1e300, 71one = 1.0, 72invsqrtpi= 5.64189583547756279280e-01, /* 0x3FE20DD7, 0x50429B6D */ 73tpi = 6.36619772367581382433e-01, /* 0x3FE45F30, 0x6DC9C883 */ --- 318 unchanged lines hidden --- | 66 67static const volatile double vone = 1, vzero = 0; 68 69static const double 70huge = 1e300, 71one = 1.0, 72invsqrtpi= 5.64189583547756279280e-01, /* 0x3FE20DD7, 0x50429B6D */ 73tpi = 6.36619772367581382433e-01, /* 0x3FE45F30, 0x6DC9C883 */ --- 318 unchanged lines hidden --- |