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