Deleted Added
full compact
math.h (140609) math.h (141280)
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 140609 2005-01-22 09:53:18Z das $
14 * $FreeBSD: head/lib/msun/src/math.h 141280 2005-02-04 14:08:32Z das $
15 */
16
17#ifndef _MATH_H_
18#define _MATH_H_
19
20#include <sys/cdefs.h>
21#include <sys/_types.h>
22#include <machine/_limits.h>

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

145#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
146#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
147
148#define MAXFLOAT ((float)3.40282346638528860e+38)
149extern int signgam;
150#endif /* __BSD_VISIBLE || __XSI_VISIBLE */
151
152#if __BSD_VISIBLE
15 */
16
17#ifndef _MATH_H_
18#define _MATH_H_
19
20#include <sys/cdefs.h>
21#include <sys/_types.h>
22#include <machine/_limits.h>

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

145#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
146#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
147
148#define MAXFLOAT ((float)3.40282346638528860e+38)
149extern int signgam;
150#endif /* __BSD_VISIBLE || __XSI_VISIBLE */
151
152#if __BSD_VISIBLE
153enum fdversion {fdlibm_ieee = -1, fdlibm_svid, fdlibm_xopen, fdlibm_posix};
154
155#define _LIB_VERSION_TYPE enum fdversion
156#define _LIB_VERSION _fdlib_version
157
158/* if global variable _LIB_VERSION is not desirable, one may
159 * change the following to be a constant by:
160 * #define _LIB_VERSION_TYPE const enum version
161 * In that case, after one initializes the value _LIB_VERSION (see
162 * s_lib_version.c) during compile time, it cannot be modified
163 * in the middle of a program
164 */
165extern _LIB_VERSION_TYPE _LIB_VERSION;
166
167#define _IEEE_ fdlibm_ieee
168#define _SVID_ fdlibm_svid
169#define _XOPEN_ fdlibm_xopen
170#define _POSIX_ fdlibm_posix
171
172/* We have a problem when using C++ since `exception' is a reserved
173 name in C++. */
174#ifndef __cplusplus
175struct exception {
176 int type;
177 char *name;
178 double arg1;
179 double arg2;
180 double retval;
181};
182#endif
183
184#if 0
185/* Old value from 4.4BSD-Lite math.h; this is probably better. */
186#define HUGE HUGE_VAL
187#else
188#define HUGE MAXFLOAT
189#endif
153#if 0
154/* Old value from 4.4BSD-Lite math.h; this is probably better. */
155#define HUGE HUGE_VAL
156#else
157#define HUGE MAXFLOAT
158#endif
190
191#define X_TLOSS 1.41484755040568800000e+16 /* pi*2**52 */
192
193#define DOMAIN 1
194#define SING 2
195#define OVERFLOW 3
196#define UNDERFLOW 4
197#define TLOSS 5
198#define PLOSS 6
199
200#endif /* __BSD_VISIBLE */
201
202/*
203 * Most of these functions depend on the rounding mode and have the side
204 * effect of raising floating-point exceptions, so they are not declared
205 * as __pure2. In C99, FENV_ACCESS affects the purity of these functions.
206 */
207__BEGIN_DECLS

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

320 */
321double gamma_r(double, int *);
322double lgamma_r(double, int *);
323
324/*
325 * IEEE Test Vector
326 */
327double significand(double);
159#endif /* __BSD_VISIBLE */
160
161/*
162 * Most of these functions depend on the rounding mode and have the side
163 * effect of raising floating-point exceptions, so they are not declared
164 * as __pure2. In C99, FENV_ACCESS affects the purity of these functions.
165 */
166__BEGIN_DECLS

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

279 */
280double gamma_r(double, int *);
281double lgamma_r(double, int *);
282
283/*
284 * IEEE Test Vector
285 */
286double significand(double);
328
329#ifndef __cplusplus
330int matherr(struct exception *);
331#endif
332#endif /* __BSD_VISIBLE */
333
334/* float versions of ANSI/POSIX functions */
335#if __ISO_C_VISIBLE >= 1999
336float acosf(float);
337float asinf(float);
338float atanf(float);
339float atan2f(float, float);

--- 162 unchanged lines hidden ---
287#endif /* __BSD_VISIBLE */
288
289/* float versions of ANSI/POSIX functions */
290#if __ISO_C_VISIBLE >= 1999
291float acosf(float);
292float asinf(float);
293float atanf(float);
294float atan2f(float, float);

--- 162 unchanged lines hidden ---