Deleted Added
full compact
math.h (78172) math.h (87805)
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 78172 2001-06-13 15:16:30Z ru $
14 * $FreeBSD: head/lib/msun/src/math.h 87805 2001-12-13 17:22:17Z phantom $
15 */
16
17#ifndef _MATH_H_
15 */
16
17#ifndef _MATH_H_
18#define _MATH_H_
18#define _MATH_H_
19
20/*
21 * ANSI/POSIX
22 */
23extern char __infinity[];
24#define HUGE_VAL (*(double *) __infinity)
25
26/*

--- 65 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
99#include <sys/cdefs.h>
19
20/*
21 * ANSI/POSIX
22 */
23extern char __infinity[];
24#define HUGE_VAL (*(double *) __infinity)
25
26/*

--- 65 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
99#include <sys/cdefs.h>
100__BEGIN_DECLS
101/*
102 * ANSI/POSIX
103 */
100/*
101 * ANSI/POSIX
102 */
104extern double acos __P((double));
105extern double asin __P((double));
106extern double atan __P((double));
107extern double atan2 __P((double, double));
108extern double cos __P((double));
109extern double sin __P((double));
110extern double tan __P((double));
103__BEGIN_DECLS
104double acos __P((double));
105double asin __P((double));
106double atan __P((double));
107double atan2 __P((double, double));
108double cos __P((double));
109double sin __P((double));
110double tan __P((double));
111
111
112extern double cosh __P((double));
113extern double sinh __P((double));
114extern double tanh __P((double));
112double cosh __P((double));
113double sinh __P((double));
114double tanh __P((double));
115
115
116extern double exp __P((double));
117extern double frexp __P((double, int *));
118extern double ldexp __P((double, int));
119extern double log __P((double));
120extern double log10 __P((double));
121extern double modf __P((double, double *));
116double exp __P((double));
117double frexp __P((double, int *));
118double ldexp __P((double, int));
119double log __P((double));
120double log10 __P((double));
121double modf __P((double, double *));
122
122
123extern double pow __P((double, double));
124extern double sqrt __P((double));
123double pow __P((double, double));
124double sqrt __P((double));
125
125
126extern double ceil __P((double));
127extern double fabs __P((double));
128extern double floor __P((double));
129extern double fmod __P((double, double));
126double ceil __P((double));
127double fabs __P((double));
128double floor __P((double));
129double fmod __P((double, double));
130
131#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
130
131#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
132extern double erf __P((double));
133extern double erfc __P((double));
134extern double gamma __P((double));
135extern double hypot __P((double, double));
136extern int isinf __P((double));
137extern int isnan __P((double));
138extern int finite __P((double));
139extern double j0 __P((double));
140extern double j1 __P((double));
141extern double jn __P((int, double));
142extern double lgamma __P((double));
143extern double y0 __P((double));
144extern double y1 __P((double));
145extern double yn __P((int, double));
132double erf __P((double));
133double erfc __P((double));
134double gamma __P((double));
135double hypot __P((double, double));
136int isinf __P((double));
137int isnan __P((double));
138int finite __P((double));
139double j0 __P((double));
140double j1 __P((double));
141double jn __P((int, double));
142double lgamma __P((double));
143double y0 __P((double));
144double y1 __P((double));
145double yn __P((int, double));
146
147#if !defined(_XOPEN_SOURCE)
146
147#if !defined(_XOPEN_SOURCE)
148extern double acosh __P((double));
149extern double asinh __P((double));
150extern double atanh __P((double));
151extern double cbrt __P((double));
152extern double logb __P((double));
153extern double nextafter __P((double, double));
154extern double remainder __P((double, double));
155extern double scalb __P((double, double));
148double acosh __P((double));
149double asinh __P((double));
150double atanh __P((double));
151double cbrt __P((double));
152double logb __P((double));
153double nextafter __P((double, double));
154double remainder __P((double, double));
155double scalb __P((double, double));
156
157#ifndef __cplusplus
156
157#ifndef __cplusplus
158extern int matherr __P((struct exception *));
158int matherr __P((struct exception *));
159#endif
160
161/*
162 * IEEE Test Vector
163 */
159#endif
160
161/*
162 * IEEE Test Vector
163 */
164extern double significand __P((double));
164double significand __P((double));
165
166/*
167 * Functions callable from C, intended to support IEEE arithmetic.
168 */
165
166/*
167 * Functions callable from C, intended to support IEEE arithmetic.
168 */
169extern double copysign __P((double, double));
170extern int ilogb __P((double));
171extern double rint __P((double));
172extern double scalbn __P((double, int));
169double copysign __P((double, double));
170int ilogb __P((double));
171double rint __P((double));
172double scalbn __P((double, int));
173
174/*
175 * BSD math library entry points
176 */
173
174/*
175 * BSD math library entry points
176 */
177extern double drem __P((double, double));
178extern double expm1 __P((double));
179extern double log1p __P((double));
177double drem __P((double, double));
178double expm1 __P((double));
179double log1p __P((double));
180
181/*
182 * Reentrant version of gamma & lgamma; passes signgam back by reference
183 * as the second argument; user must allocate space for signgam.
184 */
185#ifdef _REENTRANT
180
181/*
182 * Reentrant version of gamma & lgamma; passes signgam back by reference
183 * as the second argument; user must allocate space for signgam.
184 */
185#ifdef _REENTRANT
186extern double gamma_r __P((double, int *));
187extern double lgamma_r __P((double, int *));
186double gamma_r __P((double, int *));
187double lgamma_r __P((double, int *));
188#endif /* _REENTRANT */
189
188#endif /* _REENTRANT */
189
190
191/* float versions of ANSI/POSIX functions */
190/* float versions of ANSI/POSIX functions */
192extern float acosf __P((float));
193extern float asinf __P((float));
194extern float atanf __P((float));
195extern float atan2f __P((float, float));
196extern float cosf __P((float));
197extern float sinf __P((float));
198extern float tanf __P((float));
191float acosf __P((float));
192float asinf __P((float));
193float atanf __P((float));
194float atan2f __P((float, float));
195float cosf __P((float));
196float sinf __P((float));
197float tanf __P((float));
199
198
200extern float coshf __P((float));
201extern float sinhf __P((float));
202extern float tanhf __P((float));
199float coshf __P((float));
200float sinhf __P((float));
201float tanhf __P((float));
203
202
204extern float expf __P((float));
205extern float frexpf __P((float, int *));
206extern float ldexpf __P((float, int));
207extern float logf __P((float));
208extern float log10f __P((float));
209extern float modff __P((float, float *));
203float expf __P((float));
204float frexpf __P((float, int *));
205float ldexpf __P((float, int));
206float logf __P((float));
207float log10f __P((float));
208float modff __P((float, float *));
210
209
211extern float powf __P((float, float));
212extern float sqrtf __P((float));
210float powf __P((float, float));
211float sqrtf __P((float));
213
212
214extern float ceilf __P((float));
215extern float fabsf __P((float));
216extern float floorf __P((float));
217extern float fmodf __P((float, float));
213float ceilf __P((float));
214float fabsf __P((float));
215float floorf __P((float));
216float fmodf __P((float, float));
218
217
219extern float erff __P((float));
220extern float erfcf __P((float));
221extern float gammaf __P((float));
222extern float hypotf __P((float, float));
223extern int isnanf __P((float));
224extern int finitef __P((float));
225extern float j0f __P((float));
226extern float j1f __P((float));
227extern float jnf __P((int, float));
228extern float lgammaf __P((float));
229extern float y0f __P((float));
230extern float y1f __P((float));
231extern float ynf __P((int, float));
218float erff __P((float));
219float erfcf __P((float));
220float gammaf __P((float));
221float hypotf __P((float, float));
222int isnanf __P((float));
223int finitef __P((float));
224float j0f __P((float));
225float j1f __P((float));
226float jnf __P((int, float));
227float lgammaf __P((float));
228float y0f __P((float));
229float y1f __P((float));
230float ynf __P((int, float));
232
231
233extern float acoshf __P((float));
234extern float asinhf __P((float));
235extern float atanhf __P((float));
236extern float cbrtf __P((float));
237extern float logbf __P((float));
238extern float nextafterf __P((float, float));
239extern float remainderf __P((float, float));
240extern float scalbf __P((float, float));
232float acoshf __P((float));
233float asinhf __P((float));
234float atanhf __P((float));
235float cbrtf __P((float));
236float logbf __P((float));
237float nextafterf __P((float, float));
238float remainderf __P((float, float));
239float scalbf __P((float, float));
241
242/*
243 * float version of IEEE Test Vector
244 */
240
241/*
242 * float version of IEEE Test Vector
243 */
245extern float significandf __P((float));
244float significandf __P((float));
246
247/*
248 * Float versions of functions callable from C, intended to support
249 * IEEE arithmetic.
250 */
245
246/*
247 * Float versions of functions callable from C, intended to support
248 * IEEE arithmetic.
249 */
251extern float copysignf __P((float, float));
252extern int ilogbf __P((float));
253extern float rintf __P((float));
254extern float scalbnf __P((float, int));
250float copysignf __P((float, float));
251int ilogbf __P((float));
252float rintf __P((float));
253float scalbnf __P((float, int));
255
256/*
257 * float versions of BSD math library entry points
258 */
254
255/*
256 * float versions of BSD math library entry points
257 */
259extern float dremf __P((float, float));
260extern float expm1f __P((float));
261extern float log1pf __P((float));
258float dremf __P((float, float));
259float expm1f __P((float));
260float log1pf __P((float));
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
261
262/*
263 * Float versions of reentrant version of gamma & lgamma; passes
264 * signgam back by reference as the second argument; user must
265 * allocate space for signgam.
266 */
267#ifdef _REENTRANT
269extern float gammaf_r __P((float, int *));
270extern float lgammaf_r __P((float, int *));
268float gammaf_r __P((float, int *));
269float lgammaf_r __P((float, int *));
271#endif /* _REENTRANT */
272
273#endif /* !_XOPEN_SOURCE */
274#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
275__END_DECLS
276
270#endif /* _REENTRANT */
271
272#endif /* !_XOPEN_SOURCE */
273#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
274__END_DECLS
275
277#endif /* _MATH_H_ */
276#endif /* !_MATH_H_ */