home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / EMXLIB8F.ZIP / EMX / LIB / MATH / ASIN.S < prev    next >
Encoding:
Text File  |  1993-01-02  |  579 b   |  34 lines

  1. / asin.s (emx+gcc) -- Copyright (c) 1991-1993 by Eberhard Mattes
  2.  
  3. #include <libm.h>
  4.  
  5.         .globl  _asin
  6.  
  7.         .text
  8.  
  9.         .align  2, 0x90
  10.  
  11. / double asin (double x)
  12.  
  13. / asin(x) = atan (x / sqrt (1-x*x))
  14.  
  15. #define x       4(%esp)
  16.  
  17. _asin:
  18.         fldl    x                       / x
  19.         fld     %st
  20.         fld     %st
  21.         fmulp
  22.         fsubrl  __const_ONE
  23.         fsqrt
  24.         fdivrp
  25.         fldl    __const_ONE
  26.         fpatan
  27.         _xam
  28.         j_nan   1f
  29.         ret
  30.  
  31.         .align  2, 0x90
  32. 1:      SETERRNO($EDOM)
  33.         ret
  34.