math.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 hypot(double, double);
  16. extern double sin(double);
  17. extern double tan(double);
  18. extern double cosh(double);
  19. extern double sinh(double);
  20. extern double tanh(double);
  21. extern double exp(double);
  22. extern double frexp(double, int *);
  23. extern double ldexp(double, int);
  24. extern double log(double);
  25. extern double log10(double);
  26. extern double modf(double, double *);
  27. extern double pow(double, double);
  28. extern double sqrt(double);
  29. extern double ceil(double);
  30. extern double fabs(double);
  31. extern double floor(double);
  32. extern double fmod(double, double);
  33. extern double NaN(void);
  34. extern int isNaN(double);
  35. extern double Inf(int);
  36. extern int isInf(double, int);
  37. #ifdef _RESEARCH_SOURCE
  38. /* does >> treat left operand as unsigned ? */
  39. #define Unsigned_Shifts 1
  40. #define M_E 2.7182818284590452354 /* e */
  41. #define M_LOG2E 1.4426950408889634074 /* log 2e */
  42. #define M_LOG10E 0.43429448190325182765 /* log 10e */
  43. #define M_LN2 0.69314718055994530942 /* log e2 */
  44. #define M_LN10 2.30258509299404568402 /* log e10 */
  45. #define M_PI 3.14159265358979323846 /* pi */
  46. #define M_PI_2 1.57079632679489661923 /* pi/2 */
  47. #define M_PI_4 0.78539816339744830962 /* pi/4 */
  48. #define M_1_PI 0.31830988618379067154 /* 1/pi */
  49. #define M_2_PI 0.63661977236758134308 /* 2/pi */
  50. #define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
  51. #define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
  52. #define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
  53. extern double hypot(double, double);
  54. extern double erf(double);
  55. extern double erfc(double);
  56. extern double j0(double);
  57. extern double y0(double);
  58. extern double j1(double);
  59. extern double y1(double);
  60. extern double jn(int, double);
  61. extern double yn(int, double);
  62. #endif
  63. #ifdef __cplusplus
  64. }
  65. #endif
  66. #define isnan(x) isNaN(x)
  67. #define isinf(x) isInf(x, 0)
  68. #endif /* __MATH */