diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-11-22 14:04:29 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-11-22 14:04:29 +0000 |
commit | 7ce331c01ce6eb7b3f5c715a38a24359da9c6ee2 (patch) | |
tree | 3a7e8476e868ae15f4da1b7ce26b2db6f434468c /libm/ldouble/wronkl.c | |
parent | c117dd5fb183afb1a4790a6f6110d88704be6bf8 (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/wronkl.c')
-rw-r--r-- | libm/ldouble/wronkl.c | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/libm/ldouble/wronkl.c b/libm/ldouble/wronkl.c deleted file mode 100644 index bec958f01..000000000 --- a/libm/ldouble/wronkl.c +++ /dev/null @@ -1,67 +0,0 @@ -/* Wronksian test for Bessel functions. */ - -long double jnl (), ynl (), floorl (); -#define PI 3.14159265358979323846L - -long double y, Jn, Jnp1, Jmn, Jmnp1, Yn, Ynp1; -long double w1, w2, err1, max1, err2, max2; -void wronk (); - -main () -{ - long double x, delta; - int n, i, j; - - max1 = 0.0L; - max2 = 0.0L; - delta = 0.6 / PI; - for (n = -30; n <= 30; n++) - { - x = -30.0; - while (x < 30.0) - { - wronk (n, x); - x += delta; - } - delta += .00123456; - } -} - -void -wronk (n, x) - int n; - long double x; -{ - - Jnp1 = jnl (n + 1, x); - Jmn = jnl (-n, x); - Jn = jnl (n, x); - Jmnp1 = jnl (-(n + 1), x); - /* This should be trivially zero. */ - err1 = Jnp1 * Jmn + Jn * Jmnp1; - if (err1 < 0.0) - err1 = -err1; - if (err1 > max1) - { - max1 = err1; - printf ("1 %3d %.5Le %.3Le\n", n, x, max1); - } - if (x < 0.0) - { - x = -x; - Jn = jnl (n, x); - Jnp1 = jnl (n + 1, x); - } - Yn = ynl (n, x); - Ynp1 = ynl (n + 1, x); - /* The Wronksian. */ - w1 = Jnp1 * Yn - Jn * Ynp1; - /* What the Wronksian should be. */ - w2 = 2.0 / (PI * x); - err2 = w1 - w2; - if (err2 > max2) - { - max2 = err2; - printf ("2 %3d %.5Le %.3Le\n", n, x, max2); - } -} |