home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c221 / 5.ddi / MWHC.005 / C1 < prev    next >
Encoding:
Text File  |  1992-01-07  |  2.1 KB  |  80 lines

  1. /*
  2.  *   math.h -- ANSI 
  3.  *
  4.  *   Mathematical functions and constants.
  5.  *
  6.  *           Copyright (c) 1990, MetaWare Incorporated
  7.  */
  8.  
  9. #ifndef _MATH_H
  10. #define _MATH_H
  11.  
  12. #ifndef EDOM
  13. #define EDOM     23     /* errno's value for out of domain */
  14. #endif
  15.  
  16. #ifndef ERANGE
  17. #define ERANGE   24     /* errno's value for out of range  */
  18. #endif
  19.  
  20. #define HUGE_VAL 1.67e308
  21. /*      High C version:
  22. #define _PI 3.14159_26535_89793_23846_26433_83279_50288_41971_69399_37510
  23. #define _E  2.71828_18284_59045_23536_02874_71352_66249_77572_47093_69995
  24. */
  25. #define _PI 3.14159265358979323846264338327950288419716939937510
  26. #define _E  2.71828182845904523536028747135266249775724709369995
  27.  
  28. extern double acos(double __x);
  29. extern double asin(double __x);
  30. extern double atan2(double __y, double __x);
  31. extern double atan(double __x);
  32. extern double ceil(double __x);
  33. extern double cos(double __x);
  34. extern double cosh(double __x);
  35. extern double exp(double __x);
  36. extern double fabs(double __x);
  37. extern double floor(double __x);
  38. extern double fmod(double __x, double __y);
  39. extern double frexp(double __value, int *__exp);
  40. extern double ldexp(double __x, int __exp);
  41. extern double log10(double __x);
  42. extern double log(double __x);
  43. extern double modf(double __value, double *__iptr);
  44. extern double pow(double __x, double __y);
  45. extern double sin(double __x);
  46. extern double sinh(double __x);
  47. extern double sqrt(double __x);
  48. extern double tan(double __x);
  49. extern double tanh(double __x);
  50.  
  51. #ifdef _MSDOS
  52. #ifndef _COMPLEX_DEFINED
  53. #define _COMPLEX_DEFINED
  54. #ifdef __HIGHC__
  55. #define _complex complex
  56. #endif
  57. struct _complex { double x,y; };
  58. #endif
  59.  
  60. extern double _cabs(struct _complex);
  61. extern double _hypot(double __x, double __y);
  62.  
  63. #ifdef __HIGHC__ 
  64.  
  65. #undef abs
  66. #undef labs
  67. extern int  abs(int __i);
  68. extern long labs(long __i);
  69. #define abs(i)  (_abs(i))
  70. #define labs(i) (_abs(i))
  71.  
  72. extern double cabs(struct complex __z);   /* non-ansi versions of cabs and hypot */
  73. extern double hypot(double __x, double __y);
  74. extern double atof(const char *__nptr);
  75.  
  76. #endif /* __HIGHC__ */
  77. #endif /* _MSDOS */
  78.  
  79. #endif /* _MATH_H */
  80.