summaryrefslogtreecommitdiff
path: root/libm/ldouble/ynl.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-11-22 14:04:29 +0000
committerEric Andersen <andersen@codepoet.org>2001-11-22 14:04:29 +0000
commit7ce331c01ce6eb7b3f5c715a38a24359da9c6ee2 (patch)
tree3a7e8476e868ae15f4da1b7ce26b2db6f434468c /libm/ldouble/ynl.c
parentc117dd5fb183afb1a4790a6f6110d88704be6bf8 (diff)
Totally rework the math library, this time based on the MacOs X
math library (which is itself based on the math lib from FreeBSD). -Erik
Diffstat (limited to 'libm/ldouble/ynl.c')
-rw-r--r--libm/ldouble/ynl.c113
1 files changed, 0 insertions, 113 deletions
diff --git a/libm/ldouble/ynl.c b/libm/ldouble/ynl.c
deleted file mode 100644
index 444792850..000000000
--- a/libm/ldouble/ynl.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/* ynl.c
- *
- * Bessel function of second kind of integer order
- *
- *
- *
- * SYNOPSIS:
- *
- * long double x, y, ynl();
- * int n;
- *
- * y = ynl( n, x );
- *
- *
- *
- * DESCRIPTION:
- *
- * Returns Bessel function of order n, where n is a
- * (possibly negative) integer.
- *
- * The function is evaluated by forward recurrence on
- * n, starting with values computed by the routines
- * y0l() and y1l().
- *
- * If n = 0 or 1 the routine for y0l or y1l is called
- * directly.
- *
- *
- *
- * ACCURACY:
- *
- *
- * Absolute error, except relative error when y > 1.
- * x >= 0, -30 <= n <= +30.
- * arithmetic domain # trials peak rms
- * IEEE -30, 30 10000 1.3e-18 1.8e-19
- *
- *
- * ERROR MESSAGES:
- *
- * message condition value returned
- * ynl singularity x = 0 MAXNUML
- * ynl overflow MAXNUML
- *
- * Spot checked against tables for x, n between 0 and 100.
- *
- */
-
-/*
-Cephes Math Library Release 2.1: December, 1988
-Copyright 1984, 1987 by Stephen L. Moshier
-Direct inquiries to 30 Frost Street, Cambridge, MA 02140
-*/
-
-#include <math.h>
-extern long double MAXNUML;
-#ifdef ANSIPROT
-extern long double y0l ( long double );
-extern long double y1l ( long double );
-#else
-long double y0l(), y1l();
-#endif
-
-long double ynl( n, x )
-int n;
-long double x;
-{
-long double an, anm1, anm2, r;
-int k, sign;
-
-if( n < 0 )
- {
- n = -n;
- if( (n & 1) == 0 ) /* -1**n */
- sign = 1;
- else
- sign = -1;
- }
-else
- sign = 1;
-
-
-if( n == 0 )
- return( sign * y0l(x) );
-if( n == 1 )
- return( sign * y1l(x) );
-
-/* test for overflow */
-if( x <= 0.0L )
- {
- mtherr( "ynl", SING );
- return( -MAXNUML );
- }
-
-/* forward recurrence on n */
-
-anm2 = y0l(x);
-anm1 = y1l(x);
-k = 1;
-r = 2 * k;
-do
- {
- an = r * anm1 / x - anm2;
- anm2 = anm1;
- anm1 = an;
- r += 2.0L;
- ++k;
- }
-while( k < n );
-
-
-return( sign * an );
-}