1: /*
   2:  * Copyright (c) 1980 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  */
   6: 
   7: #ifndef lint
   8: static char sccsid[] = "@(#)acos.c	5.1 (Berkeley) 5/8/85";
   9: #endif not lint
  10: 
  11: /*
  12: acos(arg) return the arccos,
  13: 	respectively of their arguments.
  14: 
  15: 	Arctan is called after appropriate range reduction.
  16: */
  17: 
  18: #include    <errno.h>
  19: int errno;
  20: double atan();
  21: double asin();
  22: static double pio2  = 1.570796326794896619;
  23: 
  24: double
  25: acos(arg) double arg; {
  26: 
  27:     asm("	bispsw	$0xe0");
  28:     if(arg > 1.|| arg < -1.){
  29:         errno = EDOM;
  30:         return(0.);
  31:     }
  32: 
  33:     return(pio2 - asin(arg));
  34: }

Defined functions

Defined variables

errno defined in line 19; used 1 times
  • in line 29
pio2 defined in line 22; used 1 times
  • in line 33
sccsid defined in line 8; never used
Last modified: 1985-05-08
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 956
Valid CSS Valid XHTML 1.0 Strict