|
|
1.1 ! root 1: /* ! 2: acos(arg) return the arccos, ! 3: respectively of their arguments. ! 4: ! 5: Arctan is called after appropriate range reduction. ! 6: */ ! 7: ! 8: #include <errno.h> ! 9: int errno; ! 10: double atan(); ! 11: double asin(); ! 12: static double pio2 = 1.570796326794896619; ! 13: ! 14: double ! 15: acos(arg) double arg; { ! 16: ! 17: if(arg > 1.|| arg < -1.){ ! 18: errno = EDOM; ! 19: return(0.); ! 20: } ! 21: ! 22: return(pio2 - asin(arg)); ! 23: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.