home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / xco212p.zip / ISODEF / realmath.def < prev    next >
Text File  |  1995-05-31  |  1KB  |  53 lines

  1. <* NEW INTRINSIC+ *>
  2. DEFINITION MODULE RealMath;
  3.  
  4.   (* Mathematical functions for the type REAL *)
  5.  
  6. CONST
  7.   pi   = 3.141592;
  8.   exp1 = 2.718281;
  9.  
  10. PROCEDURE sqrt (x: REAL): REAL;
  11.   (* Returns the positive square root of x *)
  12.  
  13. PROCEDURE exp (x: REAL): REAL;
  14.   (* Returns the exponential of x *)
  15.  
  16. PROCEDURE ln (x: REAL): REAL;
  17.   (* Returns the natural logarithm of x *)
  18.  
  19.   (* The angle in all trigonometric functions is measured in radians *)
  20.  
  21. PROCEDURE sin (x: REAL): REAL;
  22.   (* Returns the sine of x *)
  23.  
  24. PROCEDURE cos (x: REAL): REAL;
  25.   (* Returns the cosine of x *)
  26.  
  27. PROCEDURE tan (x: REAL): REAL;
  28.   (* Returns the tangent of x *)
  29.  
  30. PROCEDURE arcsin (x: REAL): REAL;
  31.   (* Returns the arcsine of x *)
  32.  
  33. PROCEDURE arccos (x: REAL): REAL;
  34.   (* Returns the arccosine of x *)
  35.  
  36. PROCEDURE arctan (x: REAL): REAL;
  37.   (* Returns the arctangent of x *)
  38.  
  39. PROCEDURE power (base, exponent: REAL): REAL;
  40.   (* Returns the value of the number base raised to the power exponent *)
  41.  
  42. PROCEDURE round (x: REAL): INTEGER;
  43.   (* Returns the value of x rounded to the nearest integer *)
  44.  
  45. PROCEDURE IsRMathException (): BOOLEAN;
  46.   (* Returns TRUE if the current coroutine is in the exceptional execution state
  47.      because of the raising of an exception in a routine from this module; otherwise
  48.      returns FALSE.
  49.   *)
  50.  
  51. END RealMath.
  52.  
  53.