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