1
0

math.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef __MATH
  2. #define __MATH
  3. #pragma lib "/$M/lib/ape/libap.a"
  4. /* a HUGE_VAL appropriate for IEEE double-precision */
  5. /* the correct value, 1.797693134862316e+308, causes a ken overflow */
  6. #define HUGE_VAL 1.79769313486231e+308
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. extern double acos(double);
  11. extern double asin(double);
  12. extern double atan(double);
  13. extern double atan2(double, double);
  14. extern double cos(double);
  15. extern double sin(double);
  16. extern double tan(double);
  17. extern double cosh(double);
  18. extern double sinh(double);
  19. extern double tanh(double);
  20. extern double exp(double);
  21. extern double frexp(double, int *);
  22. extern double ldexp(double, int);
  23. extern double log(double);
  24. extern double log10(double);
  25. extern double modf(double, double *);
  26. extern double pow(double, double);
  27. extern double sqrt(double);
  28. extern double ceil(double);
  29. extern double fabs(double);
  30. extern double floor(double);
  31. extern double fmod(double, double);
  32. extern double NaN(void);
  33. extern int isNaN(double);
  34. extern double Inf(int);
  35. extern int isInf(double, int);
  36. #ifdef __cplusplus
  37. }
  38. #endif
  39. #ifdef _RESEARCH_SOURCE
  40. /* does >> treat left operand as unsigned ? */
  41. #define Unsigned_Shifts 1
  42. #define M_E 2.7182818284590452354 /* e */
  43. #define M_LOG2E 1.4426950408889634074 /* log 2e */
  44. #define M_LOG10E 0.43429448190325182765 /* log 10e */
  45. #define M_LN2 0.69314718055994530942 /* log e2 */
  46. #define M_LN10 2.30258509299404568402 /* log e10 */
  47. #define M_PI 3.14159265358979323846 /* pi */
  48. #define M_PI_2 1.57079632679489661923 /* pi/2 */
  49. #define M_PI_4 0.78539816339744830962 /* pi/4 */
  50. #define M_1_PI 0.31830988618379067154 /* 1/pi */
  51. #define M_2_PI 0.63661977236758134308 /* 2/pi */
  52. #define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
  53. #define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
  54. #define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
  55. extern double hypot(double, double);
  56. #endif
  57. #endif /* __MATH */