Lines Matching defs:n
35 * of order n: jn(n,x),yn(n,x);
38 * y0(0)=y1(0)=yn(n,0) = -inf with division by zero signal;
39 * y0(-ve)=y1(-ve)=yn(n,-ve) are NaN with invalid signal.
40 * Note 2. About jn(n,x), yn(n,x)
41 * For n=0, j0(x) is called,
42 * for n=1, j1(x) is called,
43 * for n<x, forward recursion us used starting
45 * for n>x, a continued fraction approximation to
46 * j(n,x)/j(n-1,x) is evaluated and then backward
48 * for j(n,x). The resulting value of j(0,x) is
50 * supposed value of j(n,x).
52 * yn(n,x) is similar in all respects, except
54 * values of n>1.
71 jnl(n, x) int n; GENERIC x; {
76 * J(-n,x) = (-1)^n * J(n, x), J(n, -x) = (-1)^n * J(n, x)
77 * Thus, J(-n,x) = J(n,-x)
79 if (n < 0) {
80 n = -n;
83 if (n == 0)
85 if (n == 1)
89 if ((n&1) == 0)
90 sgn = 0; /* even n */
92 sgn = signbitl(x); /* old n */
95 else if ((GENERIC)n <= x) {
98 * J(n+1,x)=2n/x *J(n,x)-J(n-1,x)
102 * x >> n**2
103 * Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi)
104 * Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi)
106 * xn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then
108 * n sin(xn)*sqt2 cos(xn)*sqt2
115 switch (n&3) {
125 for (i = 1; i < n; i++) {
132 if (x < 1e-17L) { /* use J(n,x) = 1/n!*(x/2)^n */
133 b = powl(0.5L*x, (GENERIC)n);
135 for (a = one, i = 1; i <= n; i++) a *= (GENERIC)i;
142 * J(n,x)/J(n-1,x) = ---- ------ ------ .....
143 * 2n - 2(n+1) - 2(n+2)
147 * 2n 2(n+1) 2(n+2)
151 * Let w = 2n/x and h=2/x, then the above quotient
171 w = (n+n)/(double)x; h = 2.0/(double)x;
179 m = n+n;
180 for (t = zero, i = 2*(n+k); i >= m; i -= 2) t = one/(i/x-t);
184 * estimate log((2/x)^n*n!) = n*log(2/x)+n*ln(n)
185 * hence, if n*(log(2n/x)) > ...
192 tmp = n;
196 for (i = n-1; i > 0; i--) {
202 for (i = n-1; i > 0; i--) {
222 GENERIC ynl(n, x)
223 int n; GENERIC x; {
237 if (n < 0) {
238 n = -n;
239 if ((n&1) == 1) sign = -1;
241 if (n == 0)
243 if (n == 1)
248 if (x > 1.0e91L) { /* x >> n**2
249 Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi)
250 Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi)
252 xn = x-(2n+1)*pi/4, sqt2 = sqrt(2), then
254 n sin(xn)*sqt2 cos(xn)*sqt2
261 switch (n&3) {
274 for (i = 1; i < n; i++) {