math.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 _RESEARCH_SOURCE
  37. /* does >> treat left operand as unsigned ? */
  38. #define Unsigned_Shifts 1
  39. #define M_E 2.7182818284590452354 /* e */
  40. #define M_LOG2E 1.4426950408889634074 /* log 2e */
  41. #define M_LOG10E 0.43429448190325182765 /* log 10e */
  42. #define M_LN2 0.69314718055994530942 /* log e2 */
  43. #define M_LN10 2.30258509299404568402 /* log e10 */
  44. #define M_PI 3.14159265358979323846 /* pi */
  45. #define M_PI_2 1.57079632679489661923 /* pi/2 */
  46. #define M_PI_4 0.78539816339744830962 /* pi/4 */
  47. #define M_1_PI 0.31830988618379067154 /* 1/pi */
  48. #define M_2_PI 0.63661977236758134308 /* 2/pi */
  49. #define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
  50. #define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
  51. #define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
  52. extern double hypot(double, double);
  53. extern double erf(double);
  54. extern double erfc(double);
  55. extern double j0(double);
  56. extern double y0(double);
  57. extern double j1(double);
  58. extern double y1(double);
  59. extern double jn(int, double);
  60. extern double yn(int, double);
  61. #endif
  62. #ifdef __cplusplus
  63. }
  64. #endif
  65. #endif /* __MATH */