| 1 |
#ifndef lint
|
| 2 |
static const char RCSid[] = "$Id$";
|
| 3 |
#endif
|
| 4 |
/*
|
| 5 |
* biggerlib.c - functions for an even bigger library.
|
| 6 |
*
|
| 7 |
* 10/2/86
|
| 8 |
*/
|
| 9 |
|
| 10 |
#include <math.h>
|
| 11 |
|
| 12 |
double argument();
|
| 13 |
static double l_j0(), l_j1(), l_jn(), l_y0(), l_y1(), l_yn();
|
| 14 |
static double l_erf(), l_erfc();
|
| 15 |
|
| 16 |
|
| 17 |
biggerlib() /* expand the library */
|
| 18 |
{
|
| 19 |
/* the Bessel functions */
|
| 20 |
funset("j0", 1, ':', l_j0);
|
| 21 |
funset("j1", 1, ':', l_j1);
|
| 22 |
funset("jn", 2, ':', l_jn);
|
| 23 |
funset("y0", 1, ':', l_y0);
|
| 24 |
funset("y1", 1, ':', l_y1);
|
| 25 |
funset("yn", 2, ':', l_yn);
|
| 26 |
funset("erf", 1, ':', l_erf);
|
| 27 |
funset("erfc", 1, ':', l_erfc);
|
| 28 |
}
|
| 29 |
|
| 30 |
|
| 31 |
static double
|
| 32 |
l_j0()
|
| 33 |
{
|
| 34 |
return(j0(argument(1)));
|
| 35 |
}
|
| 36 |
|
| 37 |
|
| 38 |
static double
|
| 39 |
l_j1()
|
| 40 |
{
|
| 41 |
return(j1(argument(1)));
|
| 42 |
}
|
| 43 |
|
| 44 |
|
| 45 |
static double
|
| 46 |
l_jn()
|
| 47 |
{
|
| 48 |
return(jn((int)(argument(1)+.5), argument(2)));
|
| 49 |
}
|
| 50 |
|
| 51 |
|
| 52 |
static double
|
| 53 |
l_y0()
|
| 54 |
{
|
| 55 |
return(y0(argument(1)));
|
| 56 |
}
|
| 57 |
|
| 58 |
|
| 59 |
static double
|
| 60 |
l_y1()
|
| 61 |
{
|
| 62 |
return(y1(argument(1)));
|
| 63 |
}
|
| 64 |
|
| 65 |
|
| 66 |
static double
|
| 67 |
l_yn()
|
| 68 |
{
|
| 69 |
return(yn((int)(argument(1)+.5), argument(2)));
|
| 70 |
}
|
| 71 |
|
| 72 |
|
| 73 |
static double
|
| 74 |
l_erf()
|
| 75 |
{
|
| 76 |
extern double erf();
|
| 77 |
|
| 78 |
return(erf(argument(1)));
|
| 79 |
}
|
| 80 |
|
| 81 |
|
| 82 |
static double
|
| 83 |
l_erfc()
|
| 84 |
{
|
| 85 |
extern double erfc();
|
| 86 |
|
| 87 |
return(erfc(argument(1)));
|
| 88 |
}
|