home *** CD-ROM | disk | FTP | other *** search
- /*
- * math.h -- ANSI
- *
- * Mathematical functions and constants.
- *
- * Copyright (c) 1990, MetaWare Incorporated
- */
-
- #ifndef _MATH_H
- #define _MATH_H
-
- #ifndef EDOM
- #define EDOM 23 /* errno's value for out of domain */
- #endif
-
- #ifndef ERANGE
- #define ERANGE 24 /* errno's value for out of range */
- #endif
-
- #define HUGE_VAL 1.67e308
- /* High C version:
- #define _PI 3.14159_26535_89793_23846_26433_83279_50288_41971_69399_37510
- #define _E 2.71828_18284_59045_23536_02874_71352_66249_77572_47093_69995
- */
- #define _PI 3.14159265358979323846264338327950288419716939937510
- #define _E 2.71828182845904523536028747135266249775724709369995
-
- extern double acos(double __x);
- extern double asin(double __x);
- extern double atan2(double __y, double __x);
- extern double atan(double __x);
- extern double ceil(double __x);
- extern double cos(double __x);
- extern double cosh(double __x);
- extern double exp(double __x);
- extern double fabs(double __x);
- extern double floor(double __x);
- extern double fmod(double __x, double __y);
- extern double frexp(double __value, int *__exp);
- extern double ldexp(double __x, int __exp);
- extern double log10(double __x);
- extern double log(double __x);
- extern double modf(double __value, double *__iptr);
- extern double pow(double __x, double __y);
- extern double sin(double __x);
- extern double sinh(double __x);
- extern double sqrt(double __x);
- extern double tan(double __x);
- extern double tanh(double __x);
-
- #ifdef _MSDOS
- #ifndef _COMPLEX_DEFINED
- #define _COMPLEX_DEFINED
- #ifdef __HIGHC__
- #define _complex complex
- #endif
- struct _complex { double x,y; };
- #endif
-
- extern double _cabs(struct _complex);
- extern double _hypot(double __x, double __y);
-
- #ifdef __HIGHC__
-
- #undef abs
- #undef labs
- extern int abs(int __i);
- extern long labs(long __i);
- #define abs(i) (_abs(i))
- #define labs(i) (_abs(i))
-
- extern double cabs(struct complex __z); /* non-ansi versions of cabs and hypot */
- extern double hypot(double __x, double __y);
- extern double atof(const char *__nptr);
-
- #endif /* __HIGHC__ */
- #endif /* _MSDOS */
-
- #endif /* _MATH_H */
-