BSD 4_3_Reno release
[unix-history] / usr / src / lib / libm / common_source / asincos.c
index 6ecbd0e..fa2090d 100644 (file)
@@ -1,20 +1,30 @@
-/* 
+/*
  * Copyright (c) 1985 Regents of the University of California.
  * Copyright (c) 1985 Regents of the University of California.
- * 
- * Use and reproduction of this software are granted  in  accordance  with
- * the terms and conditions specified in  the  Berkeley  Software  License
- * Agreement (in particular, this entails acknowledgement of the programs'
- * source, and inclusion of this notice) with the additional understanding
- * that  all  recipients  should regard themselves as participants  in  an
- * ongoing  research  project and hence should  feel  obligated  to report
- * their  experiences (good or bad) with these elementary function  codes,
- * using "sendbug 4bsd-bugs@BERKELEY", to the authors.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that: (1) source distributions retain this entire copyright
+ * notice and comment, and (2) distributions including binaries display
+ * the following acknowledgement:  ``This product includes software
+ * developed by the University of California, Berkeley and its contributors''
+ * in the documentation or other materials provided with the distribution
+ * and in all advertising materials mentioning features or use of this
+ * software. Neither the name of the University nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * All recipients should regard themselves as participants in an ongoing
+ * research project and hence should feel obligated to report their
+ * experiences (good or bad) with these elementary function codes, using
+ * the sendbug(8) program, to the authors.
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] =
-"@(#)asincos.c 1.1 (Berkeley) 8/21/85; 1.3 (ucb.elefunt) %G%";
-#endif not lint
+static char sccsid[] = "@(#)asincos.c  5.4 (Berkeley) 6/1/90";
+#endif /* not lint */
 
 /* ASIN(X)
  * RETURNS ARC SINE OF X
 
 /* ASIN(X)
  * RETURNS ARC SINE OF X
@@ -72,9 +82,9 @@ double asin(x)
 double x;
 {
        double s,t,copysign(),atan2(),sqrt(),one=1.0;
 double x;
 {
        double s,t,copysign(),atan2(),sqrt(),one=1.0;
-#if (!defined(VAX)&&!defined(TAHOE))
+#if !defined(vax)&&!defined(tahoe)
        if(x!=x) return(x);     /* x is NaN */
        if(x!=x) return(x);     /* x is NaN */
-#endif
+#endif /* !defined(vax)&&!defined(tahoe) */
        s=copysign(x,one);
        if(s <= 0.5)
            return(atan2(x,sqrt(one-x*x)));
        s=copysign(x,one);
        if(s <= 0.5)
            return(atan2(x,sqrt(one-x*x)));
@@ -139,9 +149,9 @@ double acos(x)
 double x;
 {
        double t,copysign(),atan2(),sqrt(),one=1.0;
 double x;
 {
        double t,copysign(),atan2(),sqrt(),one=1.0;
-#if (!defined(VAX)&&!defined(TAHOE))
+#if !defined(vax)&&!defined(tahoe)
        if(x!=x) return(x);
        if(x!=x) return(x);
-#endif
+#endif /* !defined(vax)&&!defined(tahoe) */
        if( x != -1.0)
            t=atan2(sqrt((one-x)/(one+x)),one);
        else
        if( x != -1.0)
            t=atan2(sqrt((one-x)/(one+x)),one);
        else