home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Pascal / Libraries / CMmath / CMmath.p < prev    next >
Encoding:
Text File  |  1993-06-25  |  1.2 KB  |  39 lines  |  [TEXT/PJMM]

  1. {ComplexMath interface version 1.0, march 23, 1993, Jude Giampaolo}
  2. {Modified to version 1.1, june 4, 1993}
  3. {Modified to version 1.2, june 21, 1993. Added basic trancendental support}
  4. {If you find any of these functions to be helpful, or if you have any }
  5. {comments plese let me know at jcg@po.cwru.edu }
  6. {I in no way claim that these routines operate in their intended manner}
  7. {Please note that the accuracy is not all that great, it is reasonable however}
  8. {This should be corrected in a future revision}
  9.  
  10. unit complex;
  11. interface
  12.  
  13.     type
  14.         complex = record
  15.                 r, i: real;
  16.             end;
  17.  
  18.     var
  19.         CMErr: integer;
  20.  
  21.     function CMAdd (a, b: complex): complex;
  22.     function CMSubtract (a, b: complex): complex;
  23.     function CMMultiply (a, b: complex): complex;
  24.     function CMDivide (a, b: complex): complex;
  25.     function CMAbs (a: complex): real;
  26.     function CMPower (base: complex; exponent: real): complex;
  27.     function CMExp (exponent: complex): complex;
  28.     function CMln (y: complex): complex;
  29.     function CMr2c (a: real): complex;
  30.     function CMi2c (b: real): complex;
  31.     function CMcosh (z: complex): complex;
  32.     function CMsinh (z: complex): complex;
  33.     function CMSin (z: complex): complex;
  34.     function CMCos (z: complex): complex;
  35.     function CMArctan (z: complex): complex;
  36.  
  37. implementation
  38.  
  39. end.