version 1.10, 2005/11/17 20:07:40 |
version 1.11, 2005/12/13 00:35:22 |
|
|
#ifndef _MATH_H_ |
#ifndef _MATH_H_ |
#define _MATH_H_ |
#define _MATH_H_ |
|
|
|
#include <sys/cdefs.h> |
|
|
/* |
/* |
* ANSI/POSIX |
* ANSI/POSIX |
*/ |
*/ |
|
|
/* |
/* |
* XOPEN/SVID |
* XOPEN/SVID |
*/ |
*/ |
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) |
#if __BSD_VISIBLE || __XPG_VISIBLE |
#define M_E 2.7182818284590452354 /* e */ |
#define M_E 2.7182818284590452354 /* e */ |
#define M_LOG2E 1.4426950408889634074 /* log 2e */ |
#define M_LOG2E 1.4426950408889634074 /* log 2e */ |
#define M_LOG10E 0.43429448190325182765 /* log 10e */ |
#define M_LOG10E 0.43429448190325182765 /* log 10e */ |
|
|
#endif |
#endif |
|
|
extern int signgam; |
extern int signgam; |
|
#endif /* __BSD_VISIBLE || __XPG_VISIBLE */ |
|
|
#if !defined(_XOPEN_SOURCE) |
#if __BSD_VISIBLE |
enum fdversion {fdlibm_ieee = -1, fdlibm_svid, fdlibm_xopen, fdlibm_posix}; |
enum fdversion {fdlibm_ieee = -1, fdlibm_svid, fdlibm_xopen, fdlibm_posix}; |
|
|
#define _LIB_VERSION_TYPE enum fdversion |
#define _LIB_VERSION_TYPE enum fdversion |
|
|
#define TLOSS 5 |
#define TLOSS 5 |
#define PLOSS 6 |
#define PLOSS 6 |
|
|
#endif /* !_XOPEN_SOURCE */ |
#endif /* __BSD_VISIBLE */ |
#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */ |
|
|
|
|
|
#include <sys/cdefs.h> |
|
__BEGIN_DECLS |
__BEGIN_DECLS |
/* |
/* |
* ANSI/POSIX |
* ANSI/POSIX |
|
|
extern double floor(double); |
extern double floor(double); |
extern double fmod(double, double); |
extern double fmod(double, double); |
|
|
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) |
#if __BSD_VISIBLE || __XPG_VISIBLE |
extern double erf(double); |
extern double erf(double); |
extern double erfc(double); |
extern double erfc(double); |
extern double gamma(double); |
extern double gamma(double); |
|
|
extern double y1(double); |
extern double y1(double); |
extern double yn(int, double); |
extern double yn(int, double); |
|
|
#if !defined(_XOPEN_SOURCE) |
#if __BSD_VISIBLE || __XPG_VISIBLE >= 500 |
extern double acosh(double); |
extern double acosh(double); |
extern double asinh(double); |
extern double asinh(double); |
extern double atanh(double); |
extern double atanh(double); |
|
|
* Reentrant version of gamma & lgamma; passes signgam back by reference |
* Reentrant version of gamma & lgamma; passes signgam back by reference |
* as the second argument; user must allocate space for signgam. |
* as the second argument; user must allocate space for signgam. |
*/ |
*/ |
#ifdef _REENTRANT |
#if __BSD_VISIBLE || defined(_REENTRANT) |
extern double gamma_r(double, int *); |
extern double gamma_r(double, int *); |
extern double lgamma_r(double, int *); |
extern double lgamma_r(double, int *); |
#endif /* _REENTRANT */ |
#endif /* __BSD_VISIBLE || _REENTRANT */ |
|
|
|
|
/* float versions of ANSI/POSIX functions */ |
/* float versions of ANSI/POSIX functions */ |
|
|
* signgam back by reference as the second argument; user must |
* signgam back by reference as the second argument; user must |
* allocate space for signgam. |
* allocate space for signgam. |
*/ |
*/ |
#ifdef _REENTRANT |
#if __BSD_VISIBLE || defined(_REENTRANT) |
extern float gammaf_r(float, int *); |
extern float gammaf_r(float, int *); |
extern float lgammaf_r(float, int *); |
extern float lgammaf_r(float, int *); |
#endif /* _REENTRANT */ |
#endif /* __BSD_VISIBLE || _REENTRANT */ |
|
|
#endif /* !_XOPEN_SOURCE */ |
#endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 500 */ |
#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */ |
#endif /* __BSD_VISIBLE || __XPG_VISIBLE */ |
__END_DECLS |
__END_DECLS |
|
|
#endif /* _MATH_H_ */ |
#endif /* _MATH_H_ */ |