ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/biggerlib.c
Revision: 3.6
Committed: Sat Apr 5 00:34:46 2025 UTC (3 weeks, 6 days ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 3.5: +3 -3 lines
Log Message:
fix: Correction to erf() and erfc() prototypes

File Contents

# Content
1 #ifndef lint
2 static const char RCSid[] = "$Id: biggerlib.c,v 3.5 2003/08/04 22:37:53 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(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
20
21 void
22 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 l_j0(char *nm)
38 {
39 return(j0(argument(1)));
40 }
41
42
43 static double
44 l_j1(char *nm)
45 {
46 return(j1(argument(1)));
47 }
48
49
50 static double
51 l_jn(char *nm)
52 {
53 return(jn((int)(argument(1)+.5), argument(2)));
54 }
55
56
57 static double
58 l_y0(char *nm)
59 {
60 return(y0(argument(1)));
61 }
62
63
64 static double
65 l_y1(char *nm)
66 {
67 return(y1(argument(1)));
68 }
69
70
71 static double
72 l_yn(char *nm)
73 {
74 return(yn((int)(argument(1)+.5), argument(2)));
75 }
76
77
78 static double
79 l_erf(char *nm)
80 {
81 extern double erf(double x);
82
83 return(erf(argument(1)));
84 }
85
86
87 static double
88 l_erfc(char *nm)
89 {
90 extern double erfc(double x);
91
92 return(erfc(argument(1)));
93 }