summaryrefslogtreecommitdiff
path: root/include/math.h
blob: 6fbb4c7f53350b6af013f467a0a2815789e30495 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
/*
 *   This file was automatically generated by version 1.7 of cextract.
 *   Manual editing not recommended.
 *
 *   Created: Fri Feb 23 20:31:13 1996
 *
 *   Modified (anyway) for PalmOS Feb 22, 1997, D.Jeff Dionne
 */

typedef struct {
 float r;
 float i;
}cmplxf;

/* Some useful constants.  */
#define M_E		2.7182818284590452354	/* e */
#define M_LOG2E		1.4426950408889634074	/* log_2 e */
#define M_LOG10E	0.43429448190325182765	/* log_10 e */
#define M_LN2		0.69314718055994530942	/* log_e 2 */
#define M_LN10		2.30258509299404568402	/* log_e 10 */
#define M_PI		3.14159265358979323846	/* pi */
#define M_PI_2		1.57079632679489661923	/* pi/2 */
#define M_PI_4		0.78539816339744830962	/* pi/4 */
#define M_1_PI		0.31830988618379067154	/* 1/pi */
#define M_2_PI		0.63661977236758134308	/* 2/pi */
#define M_2_SQRTPI	1.12837916709551257390	/* 2/sqrt(pi) */
#define M_SQRT2		1.41421356237309504880	/* sqrt(2) */
#define M_SQRT1_2	0.70710678118654752440	/* 1/sqrt(2) */


extern float acos ( float x );
extern float acosh ( float xx );
extern int airy ( float xx, float *ai, float *aip, float *bi, float *bip );
extern float asin ( float xx );
extern float asinh ( float xx );
extern float atan2 ( float y, float x );
extern float atan ( float xx );
extern float atanh ( float xx );
extern float bdtrc ( int k, int n, float pp );
extern float bdtr ( int k, int n, float pp );
extern float bdtri ( int k, int n, float yy );
extern float beta ( float aa, float bb );
extern float cabs ( cmplxf *z );
extern void cacos ( cmplxf *z, cmplxf *w );
extern void cadd ( cmplxf *a, cmplxf *b, cmplxf *c );
extern void casin ( cmplxf *z, cmplxf *w );
extern void catan ( cmplxf *z, cmplxf *w );
extern float cbrt ( float xx );
extern void cchsh ( float xx, float *c, float *s );
extern void ccos ( cmplxf *z, cmplxf *w );
extern void ccot ( cmplxf *z, cmplxf *w );
extern void cdiv ( cmplxf *a, cmplxf *b, cmplxf *c );
extern float ceil ( float x );
extern void cexp ( cmplxf *z, cmplxf *w );
extern float chbevl ( float x, float *array, int n );
extern float chdtrc ( float dff, float xx );
extern float chdtr ( float dff, float xx );
extern float chdtri ( float dff, float yy );
extern void clog ( cmplxf *z, cmplxf *w );
extern void cmov ( short *a, short *b );
extern void cmul ( cmplxf *a, cmplxf *b, cmplxf *c );
extern void cneg ( cmplxf *a );
extern float cosdg ( float xx );
extern float cos ( float xx );
extern float cosh ( float xx );
extern float cotdg ( float x );
extern float cot ( float x );
extern void csin ( cmplxf *z, cmplxf *w );
extern void csqrt ( cmplxf *z, cmplxf *w );
extern void csub ( cmplxf *a, cmplxf *b, cmplxf *c );
extern void ctan ( cmplxf *z, cmplxf *w );
extern float ctans ( cmplxf *z );
extern float dawsn ( float xxx );
extern int dprec ( void );
extern float ellie ( float phia, float ma );
extern float ellik ( float phia, float ma );
extern float ellpe ( float xx );
extern int ellpj ( float uu, float mm, float *sn, float *cn, float *dn, float *ph );
extern float ellpk ( float xx );
extern float erfc ( float aa );
extern float erf ( float xx );
extern float exp10 ( float xx );
extern float exp2 ( float xx );
extern float exp ( float xx );
extern float expn ( int n, float xx );
extern float fac ( int i );
extern float fdtrc ( int ia, int ib, float xx );
extern float fdtr ( int ia, int ib, int xx );
extern float fdtri ( int ia, int ib, float yy );
extern float floor ( float x );
extern void fresnl ( float xxa, float *ssa, float *cca );
extern float frexp ( float x, int *pw2 );
extern float gamma ( float xx );
extern float gdtrc ( float aa, float bb, float xx );
extern float gdtr ( float aa, float bb, float xx );
extern float hyp2f0 ( float aa, float bb, float xx, int type, float *err );
extern float hyp2f1 ( float aa, float bb, float cc, float xx );
extern float hyperg ( float aa, float bb, float xx );
extern float i0e ( float x );
extern float i0 ( float x );
extern float i1e ( float xx );
extern float i1 ( float xx );
extern float igamc ( float aa, float xx );
extern float igam ( float aa, float xx );
extern float igami ( float aa, float yy0 );
extern float incbet ( float aaa, float bbb, float xxx );
extern float incbi ( float aaa, float bbb, float yyy0 );
extern float incbps ( float aa, float bb, float xx );
extern float iv ( float v, float x );
extern float j0 ( float xx );
extern float j1 ( float xx );
extern float jn ( int n, float xx );
extern float jv ( float nn, float xx );
extern float k0e ( float xx );
extern float k0 ( float xx );
extern float k1e ( float xx );
extern float k1 ( float xx );
extern float kn ( int nnn, float xx );
extern float ldexp ( float x, int pw2 );
extern int ldprec ( void );
extern float lgam ( float xx );
extern float log10 ( float xx );
extern float log2 ( float xx );
extern float log ( float xx );
/* extern int mtherr ( char *name, int code ); */
extern float nbdtrc ( int k, int n, float pp );
extern float nbdtr ( int k, int n, float pp );
extern float ndtr ( float aa );
extern float ndtri ( float yy0 );
extern float onef2 ( float aa, float bb, float cc, float xx, float *err );
extern float p1evl ( float xx, float *coef, int N );
extern float pdtrc ( int k, float mm );
extern float pdtr ( int k, float mm );
extern float pdtri ( int k, float yy );
extern void poladd ( float a[], int na, float b[], int nb, float c[] );
extern void polclr ( float *a, int n );
extern int poldiv ( float a[], int na, float b[], int nb, float c[] );
extern float poleva ( float *a, int na, float xx );
extern float polevl ( float xx, float *coef, int N );
extern void polini ( int maxdeg );
extern void polmov ( float *a, int na, float *b );
extern void polmul ( float a[], int na, float b[], int nb, float c[] );
extern void polprt ( float *a, int na, int d );
extern void polsbt ( float a[], int na, float b[], int nb, float c[] );
extern void polsub ( float a[], int na, float b[], int nb, float c[] );
extern float pow ( float x, float y );
extern float powi ( float x, int nn );
extern float psi ( float xx );
extern float redupi ( float xx );
extern float rgamma ( float xx );
extern int shichi ( float xx, float *si, float *ci );
extern int sici ( float xx, float *si, float *ci );
extern float sindg ( float xx );
extern float sin ( float xx );
extern float sinh ( float xx );
extern float spence ( float xx );
extern int sprec ( void );
extern float sqrt ( float xx );
extern float stdtr ( int k, float tt );
extern float struve ( float vv, float xx );
extern float tandg ( float x );
extern float tan ( float x );
extern float tanh ( float xx );
extern float threef0 ( float aa, float bb, float cc, float xx, float *err );
extern float y0 ( float xx );
extern float y1 ( float xx );
extern float yn ( int nn, float xx );
extern float yv ( float vv, float xx );
extern float zetac ( float xx );
extern float zeta ( float xx, float qq );