minix/include/math.h

105 lines
3.7 KiB
C
Raw Normal View History

2005-04-21 16:53:53 +02:00
/* The <math.h> header contains prototypes for mathematical functions. */
#ifndef _MATH_H
#define _MATH_H
2011-01-28 12:35:02 +01:00
#ifndef _MINIX_ANSI_H
#include <minix/ansi.h>
2005-04-21 16:53:53 +02:00
#endif
2009-12-24 21:22:41 +01:00
#define INFINITY (__infinity())
#define NAN (__qnan())
#define HUGE_VAL INFINITY
2005-04-21 16:53:53 +02:00
/* Function Prototypes. */
2009-12-24 21:22:41 +01:00
_PROTOTYPE( double __infinity, (void) );
_PROTOTYPE( double __qnan, (void) );
2005-04-21 16:53:53 +02:00
_PROTOTYPE( double acos, (double _x) );
_PROTOTYPE( double asin, (double _x) );
_PROTOTYPE( double atan, (double _x) );
_PROTOTYPE( double atan2, (double _y, double _x) );
_PROTOTYPE( double ceil, (double _x) );
_PROTOTYPE( double cos, (double _x) );
_PROTOTYPE( double cosh, (double _x) );
_PROTOTYPE( double exp, (double _x) );
_PROTOTYPE( double fabs, (double _x) );
_PROTOTYPE( float fabsf, (float _x) );
2005-04-21 16:53:53 +02:00
_PROTOTYPE( double floor, (double _x) );
_PROTOTYPE( double fmod, (double _x, double _y) );
_PROTOTYPE( double frexp, (double _x, int *_exp) );
_PROTOTYPE( double ldexp, (double _x, int _exp) );
_PROTOTYPE( double log, (double _x) );
_PROTOTYPE( double log10, (double _x) );
_PROTOTYPE( double modf, (double _x, double *_iptr) );
_PROTOTYPE( double pow, (double _x, double _y) );
2007-12-14 12:59:54 +01:00
_PROTOTYPE( double rint, (double _x) );
2010-01-08 08:27:54 +01:00
_PROTOTYPE( double scalbn, (double _x, int _exp) );
_PROTOTYPE( float scalbnf, (float _x, int _exp) );
_PROTOTYPE( double scalbln, (double _x, long _exp) );
_PROTOTYPE( float scalblnf, (float _x, long _exp) );
2005-04-21 16:53:53 +02:00
_PROTOTYPE( double sin, (double _x) );
_PROTOTYPE( double sinh, (double _x) );
_PROTOTYPE( double sqrt, (double _x) );
_PROTOTYPE( double tan, (double _x) );
_PROTOTYPE( double tanh, (double _x) );
2005-11-04 18:14:59 +01:00
_PROTOTYPE( double hypot, (double _x, double _y) );
2005-04-21 16:53:53 +02:00
#ifdef _POSIX_SOURCE /* STD-C? */
#include <mathconst.h>
2009-12-24 21:22:41 +01:00
#define FP_INFINITE 1
#define FP_NAN 2
#define FP_NORMAL 3
#define FP_SUBNORMAL 4
#define FP_ZERO 5
_PROTOTYPE( int fpclassify, (double x) );
_PROTOTYPE( int isfinite, (double x) );
_PROTOTYPE( int isinf, (double x) );
_PROTOTYPE( int isnan, (double x) );
_PROTOTYPE( int isnormal, (double x) );
_PROTOTYPE( int signbit, (double x) );
_PROTOTYPE( int isgreater, (double x, double y) );
_PROTOTYPE( int isgreaterequal, (double x, double y) );
_PROTOTYPE( int isless, (double x, double y) );
_PROTOTYPE( int islessequal, (double x, double y) );
_PROTOTYPE( int islessgreater, (double x, double y) );
_PROTOTYPE( int isunordered, (double x, double y) );
_PROTOTYPE( double nearbyint, (double x) );
2009-12-24 21:22:41 +01:00
_PROTOTYPE( double remainder, (double x, double y) );
_PROTOTYPE( double trunc, (double x) );
#endif
/* The following definitions are not implemented in the ACK math lib.
* We allow them in the GNU compiler because they are builtins there.
*/
#ifdef __GNUC__
#ifndef __cplusplus
_PROTOTYPE( float powf, (float, float) );
_PROTOTYPE( float fmodf, (float, float) );
_PROTOTYPE( double erf, (double) );
_PROTOTYPE( double erfc, (double) );
_PROTOTYPE( double gamma, (double) );
_PROTOTYPE( double j0, (double) );
_PROTOTYPE( double j1, (double) );
_PROTOTYPE( double jn, (int, double) );
_PROTOTYPE( double lgamma, (double) );
_PROTOTYPE( double y0, (double) );
_PROTOTYPE( double y1, (double) );
_PROTOTYPE( double yn, (int, double) );
_PROTOTYPE( double acosh, (double) );
_PROTOTYPE( double asinh, (double) );
_PROTOTYPE( double atanh, (double) );
_PROTOTYPE( double cbrt, (double) );
_PROTOTYPE( double expm1, (double) );
_PROTOTYPE( int ilogb, (double) );
_PROTOTYPE( double log1p, (double) );
_PROTOTYPE( double logb, (double) );
_PROTOTYPE( double nextafter, (double, double) );
_PROTOTYPE( double scalb, (double, double) );
#endif
#endif
2005-04-21 16:53:53 +02:00
#endif /* _MATH_H */