ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/biggerlib.c
Revision: 3.3
Committed: Mon Jun 30 19:04:29 2003 UTC (20 years, 10 months ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 3.2: +2 -1 lines
Log Message:
Removed stdio.h includes from calcomp.h, resolu.h, and color.h

File Contents

# Content
1 #ifndef lint
2 static const char RCSid[] = "$Id: biggerlib.c,v 3.2 2003/06/07 12:50:20 schorsch 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();
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 biggerlib() /* expand the library */
21 {
22 /* the Bessel functions */
23 funset("j0", 1, ':', l_j0);
24 funset("j1", 1, ':', l_j1);
25 funset("jn", 2, ':', l_jn);
26 funset("y0", 1, ':', l_y0);
27 funset("y1", 1, ':', l_y1);
28 funset("yn", 2, ':', l_yn);
29 funset("erf", 1, ':', l_erf);
30 funset("erfc", 1, ':', l_erfc);
31 }
32
33
34 static double
35 l_j0()
36 {
37 return(j0(argument(1)));
38 }
39
40
41 static double
42 l_j1()
43 {
44 return(j1(argument(1)));
45 }
46
47
48 static double
49 l_jn()
50 {
51 return(jn((int)(argument(1)+.5), argument(2)));
52 }
53
54
55 static double
56 l_y0()
57 {
58 return(y0(argument(1)));
59 }
60
61
62 static double
63 l_y1()
64 {
65 return(y1(argument(1)));
66 }
67
68
69 static double
70 l_yn()
71 {
72 return(yn((int)(argument(1)+.5), argument(2)));
73 }
74
75
76 static double
77 l_erf()
78 {
79 extern double erf();
80
81 return(erf(argument(1)));
82 }
83
84
85 static double
86 l_erfc()
87 {
88 extern double erfc();
89
90 return(erfc(argument(1)));
91 }