home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / QBAS / REALFUN.ZIP / DEMOATAN.BAS < prev    next >
BASIC Source File  |  1991-05-28  |  557b  |  23 lines

  1. DECLARE FUNCTION atan (y, x)
  2. DECLARE FUNCTION atand (y, x)
  3. DECLARE FUNCTION datan# (dy#, dx#)
  4. DECLARE FUNCTION datand# (dy#, dx#)
  5.  
  6. CLS : PRINT "enter any 2 numbers x and y"
  7. INPUT "x, y"; dx#, dy#: x = dx#: y = dy#
  8.  
  9. PRINT : PRINT "single precision:"
  10. t = atan(y, x)
  11. PRINT "angle = "; t; " radians"
  12. PRINT "     - or -"
  13. t = atand(y, x)
  14. PRINT "angle = "; t; " degrees"
  15.  
  16. PRINT : PRINT "double precision:"
  17. dt# = datan#(dy#, dx#)
  18. PRINT "angle = "; dt#; " radians"
  19. PRINT "     - or -"
  20. dt# = datand#(dy#, dx#)
  21. PRINT "angle = "; dt#; " degrees"
  22.  
  23.