home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / jËzyki_programowania / amigae / e_v3.2a / rkrmsrc / math / dpieee.e < prev    next >
Text File  |  1977-12-31  |  768b  |  30 lines

  1. -> dpieee.e - Math DP IEEE example of dTst().
  2.  
  3. ->>> Header (globals)
  4. MODULE 'tools/longreal'
  5.  
  6. CONST STRSIZE=20
  7. CONST FRACTSIZE=STRSIZE-8
  8. ->>>
  9.  
  10. ->>> PROC main()
  11. PROC main() HANDLE
  12.   -> E-Note: use the longreals from 'tools/longreal' for double precision IEEE
  13.   DEF num1:longreal, result, six:longreal, s[STRSIZE]:STRING
  14.   dInit(FALSE)  -> E-Note: only use mathieeedoubbas library
  15.   dDiv(dPi(num1), dFloat(-6,six), num1)  -> -30 degrees in radians
  16.   -> E-Note: or alternatively use dInit(TRUE) and dRad(dFloat(-30,num1), num1)
  17.  
  18.   result:=dTst(num1)
  19.   WriteF('Num1 = \s and result = \d\n', dFormat(s, num1, FRACTSIZE), result)
  20.  
  21. EXCEPT DO
  22.   dCleanup()
  23.   SELECT exception
  24.   CASE "DLIB";  WriteF('Error: could not open mathieeedoubbas library\n')
  25.   ENDSELECT
  26. ENDPROC
  27. ->>>
  28.  
  29.  
  30.