home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a075 / 1.img / TOOLKIT1.EXE / SST153.PRG < prev    next >
Encoding:
Text File  |  1989-08-13  |  583 b   |  33 lines

  1. ********************
  2.  
  3. FUNCTION Arccos
  4.  
  5.    * Written and contributed by ESSOR MASO
  6.    *
  7.    * -1 <= arg <= 1
  8.    *
  9.    * The error ABS(e(arg)) <= 2*10^(-8)
  10.    * 0 <= value returned <= PI
  11.    *
  12.    * The value 2 is returned if the abs(arg) > 1
  13.    *
  14.    * Correct form: ARCCOS(arg)
  15.    *
  16.    * National Bureau of Standards Handbook of Mathematical Functions
  17.  
  18.    PARAMETERS _clwork
  19.  
  20.    IF TYPE("_clwork") != "N"
  21.       RETURN(2)
  22.    ENDIF
  23.  
  24.    SET DECIMAL TO 10
  25.  
  26.    IF ABS(_clwork)>1
  27.       RETURN(2)
  28.    ENDIF
  29.  
  30.    RETURN(1.57079633 - Arcsin(_clwork))
  31.  
  32. * End of File
  33.