home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / TRSICAT.LZX / CATS_CD2_TRSI / Inc&AD1.3 / Includes / libraries / mathffp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-12  |  1.6 KB  |  79 lines

  1. #ifndef LIBRARIES_MATHFFP_H
  2. #define LIBRARIES_MATHFFP_H
  3. /*
  4. **    $Filename: libraries/mathffp.h $
  5. **    $Release: 1.3 $
  6. **
  7. **    general floating point declarations 
  8. **
  9. **    (C) Copyright 1985,1986,1987,1988 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifndef PI
  14. #define PI      ((float) 3.141592653589793)
  15. #endif
  16. #define TWO_PI      (((float) 2) * PI)
  17. #define PI2      (PI / ((float) 2))
  18. #define PI4      (PI / ((float) 4))
  19. #ifndef E
  20. #define E      ((float) 2.718281828459045)
  21. #endif
  22. #define LOG10      ((float) 2.302585092994046)
  23.  
  24. #define FPTEN      ((float) 10.0)
  25. #define FPONE      ((float) 1.0)
  26. #define FPHALF      ((float) 0.5)
  27. #define FPZERO      ((float) 0.0)
  28.  
  29. #define trunc(x)  ((int) (x))
  30. #define round(x)  ((int) ((x) + 0.5))
  31. #define itof(i)      ((float) (i))
  32.  
  33. #define fabs    SPAbs
  34. #define floor    SPFloor
  35. #define ceil    SPCeil
  36.  
  37. #define tan    SPTan
  38. #define atan    SPAtan
  39. #define cos    SPCos
  40. #define acos    SPAcos
  41. #define sin    SPSin
  42. #define asin    SPAsin
  43. #define exp    SPExp
  44. #define pow(a,b)    SPPow((b),(a))
  45. #define log    SPLog
  46. #define log10    SPLog10
  47. #define sqrt    SPSqrt
  48.  
  49. #define sinh    SPSinh
  50. #define cosh    SPCosh
  51. #define tanh    SPTanh
  52.  
  53.  
  54. int     SPFix();              /* Basic math functions */
  55. float     SPFlt();
  56. int     SPCmp();
  57. int     SPTst();
  58. float     SPAbs();
  59. float     SPFloor();
  60. float     SPCeil();
  61. #ifndef abs
  62. float     abs();
  63. #endif
  64. float     SPNeg();
  65. float     SPAdd();
  66. float     SPSub();
  67. float     SPMul();
  68. float     SPDiv();
  69.  
  70. float     SPAsin(),  SPAcos(),  SPAtan();  /* Transcendental math functions */
  71. float     SPSin(),   SPCos(),   SPTan(),      SPSincos();
  72. float     SPSinh(),  SPCosh(),  SPTanh();
  73. float     SPExp(),   SPLog(),   SPLog10(), SPPow();
  74. float     SPSqrt(),  SPFieee();
  75.  
  76. float     afp(),       dbf();          /* Math conversion functions */
  77.  
  78. #endif    /* LIBRARIES_MATHFFP_H */
  79.