Deleted Added
full compact
math.h (103686) math.h (104280)
1/*
2 * ====================================================
3 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
4 *
5 * Developed at SunPro, a Sun Microsystems, Inc. business.
6 * Permission to use, copy, modify, and distribute this
7 * software is freely granted, provided that this notice
8 * is preserved.
9 * ====================================================
10 */
11
12/*
13 * from: @(#)fdlibm.h 5.1 93/09/24
1/*
2 * ====================================================
3 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
4 *
5 * Developed at SunPro, a Sun Microsystems, Inc. business.
6 * Permission to use, copy, modify, and distribute this
7 * software is freely granted, provided that this notice
8 * is preserved.
9 * ====================================================
10 */
11
12/*
13 * from: @(#)fdlibm.h 5.1 93/09/24
14 * $FreeBSD: head/lib/msun/src/math.h 103686 2002-09-20 15:43:26Z archie $
14 * $FreeBSD: head/lib/msun/src/math.h 104280 2002-10-01 11:34:42Z bde $
15 */
16
17#ifndef _MATH_H_
18#define _MATH_H_
19
20/*
21 * ANSI/POSIX
22 */

--- 48 unchanged lines hidden (view full) ---

71 int type;
72 char *name;
73 double arg1;
74 double arg2;
75 double retval;
76};
77#endif
78
15 */
16
17#ifndef _MATH_H_
18#define _MATH_H_
19
20/*
21 * ANSI/POSIX
22 */

--- 48 unchanged lines hidden (view full) ---

71 int type;
72 char *name;
73 double arg1;
74 double arg2;
75 double retval;
76};
77#endif
78
79#if 0
80/* Old value from CSRG; this is probably better. */
81#define HUGE HUGE_VAL
82#else
79#define HUGE MAXFLOAT
83#define HUGE MAXFLOAT
84#endif
80
81/*
82 * set X_TLOSS = pi*2**52, which is possibly defined in <values.h>
83 * (one may replace the following line by "#include <values.h>")
84 */
85
86#define X_TLOSS 1.41484755040568800000e+16
87

--- 4 unchanged lines hidden (view full) ---

92#define TLOSS 5
93#define PLOSS 6
94
95#endif /* !_XOPEN_SOURCE */
96#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
97
98#include <sys/cdefs.h>
99
85
86/*
87 * set X_TLOSS = pi*2**52, which is possibly defined in <values.h>
88 * (one may replace the following line by "#include <values.h>")
89 */
90
91#define X_TLOSS 1.41484755040568800000e+16
92

--- 4 unchanged lines hidden (view full) ---

97#define TLOSS 5
98#define PLOSS 6
99
100#endif /* !_XOPEN_SOURCE */
101#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
102
103#include <sys/cdefs.h>
104
105/*
106 * Most of these functions have the side effect of setting errno, so they
107 * are not declared as __pure2. (XXX: this point needs to be revisited,
108 * since C99 doesn't require the mistake of setting errno, and we mostly
109 * don't set it anyway. In C99, pragmas and functions for changing the
110 * rounding mode affect the purity of these functions.)
111 */
100__BEGIN_DECLS
101/*
102 * ANSI/POSIX
103 */
104double acos(double);
105double asin(double);
106double atan(double);
107double atan2(double, double);
108double cos(double);
109double sin(double);
110double tan(double);
111
112double cosh(double);
113double sinh(double);
114double tanh(double);
115
116double exp(double);
112__BEGIN_DECLS
113/*
114 * ANSI/POSIX
115 */
116double acos(double);
117double asin(double);
118double atan(double);
119double atan2(double, double);
120double cos(double);
121double sin(double);
122double tan(double);
123
124double cosh(double);
125double sinh(double);
126double tanh(double);
127
128double exp(double);
117double frexp(double, int *);
129double frexp(double, int *); /* fundamentally !__pure2 */
118double ldexp(double, int);
119double log(double);
120double log10(double);
130double ldexp(double, int);
131double log(double);
132double log10(double);
121double modf(double, double *);
133double modf(double, double *); /* fundamentally !__pure2 */
122
123double pow(double, double);
124double sqrt(double);
125
126double ceil(double);
127double fabs(double);
128double floor(double);
129double fmod(double, double);
130
134
135double pow(double, double);
136double sqrt(double);
137
138double ceil(double);
139double fabs(double);
140double floor(double);
141double fmod(double, double);
142
143/*
144 * These functions are not in C90 so they can be "right". The ones that
145 * never set errno in lib/msun are declared as __pure2.
146 */
131#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
132double erf(double);
147#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
148double erf(double);
133double erfc(double);
149double erfc(double) __pure2;
150int finite(double) __pure2;
134double gamma(double);
135double hypot(double, double);
151double gamma(double);
152double hypot(double, double);
136int isinf(double);
137int isnan(double);
138int finite(double);
153int isinf(double) __pure2;
154int isnan(double) __pure2;
139double j0(double);
140double j1(double);
141double jn(int, double);
142double lgamma(double);
143double y0(double);
144double y1(double);
145double yn(int, double);
146
147#if !defined(_XOPEN_SOURCE)
148double acosh(double);
149double asinh(double);
150double atanh(double);
155double j0(double);
156double j1(double);
157double jn(int, double);
158double lgamma(double);
159double y0(double);
160double y1(double);
161double yn(int, double);
162
163#if !defined(_XOPEN_SOURCE)
164double acosh(double);
165double asinh(double);
166double atanh(double);
151double cbrt(double);
152double logb(double);
167double cbrt(double) __pure2;
168double logb(double) __pure2;
153double nextafter(double, double);
154double remainder(double, double);
155double scalb(double, double);
156double tgamma(double);
157
158#ifndef __cplusplus
159int matherr(struct exception *);
160#endif
161
162/*
163 * IEEE Test Vector
164 */
165double significand(double);
166
167/*
168 * Functions callable from C, intended to support IEEE arithmetic.
169 */
169double nextafter(double, double);
170double remainder(double, double);
171double scalb(double, double);
172double tgamma(double);
173
174#ifndef __cplusplus
175int matherr(struct exception *);
176#endif
177
178/*
179 * IEEE Test Vector
180 */
181double significand(double);
182
183/*
184 * Functions callable from C, intended to support IEEE arithmetic.
185 */
170double copysign(double, double);
186double copysign(double, double) __pure2;
171int ilogb(double);
187int ilogb(double);
172double rint(double);
188double rint(double) __pure2;
173double scalbn(double, int);
174
175/*
176 * BSD math library entry points
177 */
178double drem(double, double);
189double scalbn(double, int);
190
191/*
192 * BSD math library entry points
193 */
194double drem(double, double);
179double expm1(double);
180double log1p(double);
195double expm1(double) __pure2;
196double log1p(double) __pure2;
181
182/*
183 * Reentrant version of gamma & lgamma; passes signgam back by reference
184 * as the second argument; user must allocate space for signgam.
185 */
186#ifdef _REENTRANT
187double gamma_r(double, int *);
188double lgamma_r(double, int *);

--- 8 unchanged lines hidden (view full) ---

197float sinf(float);
198float tanf(float);
199
200float coshf(float);
201float sinhf(float);
202float tanhf(float);
203
204float expf(float);
197
198/*
199 * Reentrant version of gamma & lgamma; passes signgam back by reference
200 * as the second argument; user must allocate space for signgam.
201 */
202#ifdef _REENTRANT
203double gamma_r(double, int *);
204double lgamma_r(double, int *);

--- 8 unchanged lines hidden (view full) ---

213float sinf(float);
214float tanf(float);
215
216float coshf(float);
217float sinhf(float);
218float tanhf(float);
219
220float expf(float);
205float frexpf(float, int *);
221float frexpf(float, int *); /* fundamentally !__pure2 */
206float ldexpf(float, int);
207float logf(float);
208float log10f(float);
222float ldexpf(float, int);
223float logf(float);
224float log10f(float);
209float modff(float, float *);
225float modff(float, float *); /* fundamentally !__pure2 */
210
211float powf(float, float);
212float sqrtf(float);
213
214float ceilf(float);
215float fabsf(float);
216float floorf(float);
217float fmodf(float, float);
218
219float erff(float);
226
227float powf(float, float);
228float sqrtf(float);
229
230float ceilf(float);
231float fabsf(float);
232float floorf(float);
233float fmodf(float, float);
234
235float erff(float);
220float erfcf(float);
236float erfcf(float) __pure2;
237int finitef(float) __pure2;
221float gammaf(float);
238float gammaf(float);
222float hypotf(float, float);
223int isnanf(float);
224int finitef(float);
239float hypotf(float, float) __pure2;
240int isinf(double) __pure2;
241int isnanf(float) __pure2;
225float j0f(float);
226float j1f(float);
227float jnf(int, float);
228float lgammaf(float);
229float y0f(float);
230float y1f(float);
231float ynf(int, float);
232
233float acoshf(float);
234float asinhf(float);
235float atanhf(float);
242float j0f(float);
243float j1f(float);
244float jnf(int, float);
245float lgammaf(float);
246float y0f(float);
247float y1f(float);
248float ynf(int, float);
249
250float acoshf(float);
251float asinhf(float);
252float atanhf(float);
236float cbrtf(float);
237float logbf(float);
253float cbrtf(float) __pure2;
254float logbf(float) __pure2;
238float nextafterf(float, float);
239float remainderf(float, float);
240float scalbf(float, float);
241
242/*
243 * float version of IEEE Test Vector
244 */
245float significandf(float);
246
247/*
248 * Float versions of functions callable from C, intended to support
249 * IEEE arithmetic.
250 */
255float nextafterf(float, float);
256float remainderf(float, float);
257float scalbf(float, float);
258
259/*
260 * float version of IEEE Test Vector
261 */
262float significandf(float);
263
264/*
265 * Float versions of functions callable from C, intended to support
266 * IEEE arithmetic.
267 */
251float copysignf(float, float);
268float copysignf(float, float) __pure2;
252int ilogbf(float);
253float rintf(float);
254float scalbnf(float, int);
255
256/*
257 * float versions of BSD math library entry points
258 */
259float dremf(float, float);
269int ilogbf(float);
270float rintf(float);
271float scalbnf(float, int);
272
273/*
274 * float versions of BSD math library entry points
275 */
276float dremf(float, float);
260float expm1f(float);
261float log1pf(float);
277float expm1f(float) __pure2;
278float log1pf(float) __pure2;
262
263/*
264 * Float versions of reentrant version of gamma & lgamma; passes
265 * signgam back by reference as the second argument; user must
266 * allocate space for signgam.
267 */
268#ifdef _REENTRANT
269float gammaf_r(float, int *);
270float lgammaf_r(float, int *);
271#endif /* _REENTRANT */
272
273#endif /* !_XOPEN_SOURCE */
274#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
275__END_DECLS
276
277#endif /* !_MATH_H_ */
279
280/*
281 * Float versions of reentrant version of gamma & lgamma; passes
282 * signgam back by reference as the second argument; user must
283 * allocate space for signgam.
284 */
285#ifdef _REENTRANT
286float gammaf_r(float, int *);
287float lgammaf_r(float, int *);
288#endif /* _REENTRANT */
289
290#endif /* !_XOPEN_SOURCE */
291#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
292__END_DECLS
293
294#endif /* !_MATH_H_ */
295