Module Name:    src
Committed By:   riastradh
Date:           Mon Aug 29 01:48:34 UTC 2022

Modified Files:
        src/lib/libm/ld128: e_rem_pio2l.h
        src/lib/libm/ld80: e_rem_pio2l.h
        src/lib/libm/src: e_rem_pio2l.h k_sincos.h k_sincosl.h s_sincos.c

Log Message:
libm: Fix some whitespace issues in recent sincos additions.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libm/ld128/e_rem_pio2l.h
cvs rdiff -u -r1.1 -r1.2 src/lib/libm/ld80/e_rem_pio2l.h
cvs rdiff -u -r1.1 -r1.2 src/lib/libm/src/e_rem_pio2l.h \
    src/lib/libm/src/k_sincos.h src/lib/libm/src/k_sincosl.h
cvs rdiff -u -r1.4 -r1.5 src/lib/libm/src/s_sincos.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libm/ld128/e_rem_pio2l.h
diff -u src/lib/libm/ld128/e_rem_pio2l.h:1.1 src/lib/libm/ld128/e_rem_pio2l.h:1.2
--- src/lib/libm/ld128/e_rem_pio2l.h:1.1	Sat Aug 27 08:31:58 2022
+++ src/lib/libm/ld128/e_rem_pio2l.h	Mon Aug 29 01:48:34 2022
@@ -6,7 +6,7 @@
  *
  * Developed at SunSoft, a Sun Microsystems, Inc. business.
  * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
+ * software is freely granted, provided that this notice
  * is preserved.
  * ====================================================
  *
@@ -19,8 +19,8 @@ __FBSDID("$FreeBSD: head/lib/msun/ld128/
 #endif
 
 /* ld128 version of __ieee754_rem_pio2l(x,y)
- * 
- * return the remainder of x rem pi/2 in y[0]+y[1] 
+ *
+ * return the remainder of x rem pi/2 in y[0]+y[1]
  * use __kernel_rem_pio2()
  */
 
@@ -85,32 +85,32 @@ __ieee754_rem_pio2l(long double x, long 
 		union ieee_ext_u u2;
 	        int ex1;
 	        j  = ex;
-	        y[0] = r-w; 
+	        y[0] = r-w;
 		u2.extu_ld = y[0];
 		ex1 = u2.extu_exp;
 	        i = j-ex1;
 	        if(i>51) {  /* 2nd iteration needed, good to 248 */
 		    t  = r;
-		    w  = fn*pio2_2;	
+		    w  = fn*pio2_2;
 		    r  = t-w;
-		    w  = fn*pio2_2t-((t-r)-w);	
+		    w  = fn*pio2_2t-((t-r)-w);
 		    y[0] = r-w;
 		    u2.extu_ld = y[0];
 		    ex1 = u2.extu_exp;
 		    i = j-ex1;
 		    if(i>119) {	/* 3rd iteration need, 316 bits acc */
-		    	t  = r;	/* will cover all possible cases */
-		    	w  = fn*pio2_3;	
-		    	r  = t-w;
-		    	w  = fn*pio2_3t-((t-r)-w);	
-		    	y[0] = r-w;
+			t  = r;	/* will cover all possible cases */
+			w  = fn*pio2_3;
+			r  = t-w;
+			w  = fn*pio2_3t-((t-r)-w);
+			y[0] = r-w;
 		    }
 		}
 	    }
 	    y[1] = (r-y[0])-w;
 	    return n;
 	}
-    /* 
+    /*
      * all other (large) arguments
      */
 	if(ex==0x7fff) {		/* x is inf or NaN */

Index: src/lib/libm/ld80/e_rem_pio2l.h
diff -u src/lib/libm/ld80/e_rem_pio2l.h:1.1 src/lib/libm/ld80/e_rem_pio2l.h:1.2
--- src/lib/libm/ld80/e_rem_pio2l.h:1.1	Sat Aug 27 08:31:59 2022
+++ src/lib/libm/ld80/e_rem_pio2l.h	Mon Aug 29 01:48:34 2022
@@ -6,7 +6,7 @@
  *
  * Developed at SunSoft, a Sun Microsystems, Inc. business.
  * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
+ * software is freely granted, provided that this notice
  * is preserved.
  * ====================================================
  *
@@ -19,8 +19,8 @@ __FBSDID("$FreeBSD: head/lib/msun/ld80/e
 #endif
 
 /* ld80 version of __ieee754_rem_pio2l(x,y)
- * 
- * return the remainder of x rem pi/2 in y[0]+y[1] 
+ *
+ * return the remainder of x rem pi/2 in y[0]+y[1]
  * use __kernel_rem_pio2()
  */
 
@@ -94,32 +94,32 @@ __ieee754_rem_pio2l(long double x, long 
 		union ieee_ext_u u2;
 	        int ex1;
 	        j  = ex;
-	        y[0] = r-w; 
+	        y[0] = r-w;
 		u2.extu_ld = y[0];
 		ex1 = u2.extu_exp;
 	        i = j-ex1;
 	        if(i>22) {  /* 2nd iteration needed, good to 141 */
 		    t  = r;
-		    w  = fn*pio2_2;	
+		    w  = fn*pio2_2;
 		    r  = t-w;
-		    w  = fn*pio2_2t-((t-r)-w);	
+		    w  = fn*pio2_2t-((t-r)-w);
 		    y[0] = r-w;
 		    u2.extu_ld = y[0];
 		    ex1 = u2.extu_exp;
 		    i = j-ex1;
 		    if(i>61) {	/* 3rd iteration need, 180 bits acc */
-		    	t  = r;	/* will cover all possible cases */
-		    	w  = fn*pio2_3;	
-		    	r  = t-w;
-		    	w  = fn*pio2_3t-((t-r)-w);	
-		    	y[0] = r-w;
+			t  = r;	/* will cover all possible cases */
+			w  = fn*pio2_3;
+			r  = t-w;
+			w  = fn*pio2_3t-((t-r)-w);
+			y[0] = r-w;
 		    }
 		}
 	    }
 	    y[1] = (r-y[0])-w;
 	    return n;
 	}
-    /* 
+    /*
      * all other (large) arguments
      */
 	if(ex==0x7fff) {		/* x is inf or NaN */

Index: src/lib/libm/src/e_rem_pio2l.h
diff -u src/lib/libm/src/e_rem_pio2l.h:1.1 src/lib/libm/src/e_rem_pio2l.h:1.2
--- src/lib/libm/src/e_rem_pio2l.h:1.1	Sat Aug 27 08:31:59 2022
+++ src/lib/libm/src/e_rem_pio2l.h	Mon Aug 29 01:48:34 2022
@@ -6,7 +6,7 @@
  *
  * Developed at SunSoft, a Sun Microsystems, Inc. business.
  * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
+ * software is freely granted, provided that this notice
  * is preserved.
  * ====================================================
  *
@@ -17,8 +17,8 @@
 __FBSDID("$FreeBSD: head/lib/msun/ld128/e_rem_pio2l.h 336545 2018-07-20 12:42:24Z bde $");
 
 /* ld128 version of __ieee754_rem_pio2l(x,y)
- * 
- * return the remainder of x rem pi/2 in y[0]+y[1] 
+ *
+ * return the remainder of x rem pi/2 in y[0]+y[1]
  * use __kernel_rem_pio2()
  */
 
@@ -83,32 +83,32 @@ __ieee754_rem_pio2l(long double x, long 
 		union IEEEl2bits u2;
 	        int ex1;
 	        j  = ex;
-	        y[0] = r-w; 
+	        y[0] = r-w;
 		u2.e = y[0];
 		ex1 = u2.xbits.expsign & 0x7fff;
 	        i = j-ex1;
 	        if(i>51) {  /* 2nd iteration needed, good to 248 */
 		    t  = r;
-		    w  = fn*pio2_2;	
+		    w  = fn*pio2_2;
 		    r  = t-w;
-		    w  = fn*pio2_2t-((t-r)-w);	
+		    w  = fn*pio2_2t-((t-r)-w);
 		    y[0] = r-w;
 		    u2.e = y[0];
 		    ex1 = u2.xbits.expsign & 0x7fff;
 		    i = j-ex1;
 		    if(i>119) {	/* 3rd iteration need, 316 bits acc */
-		    	t  = r;	/* will cover all possible cases */
-		    	w  = fn*pio2_3;	
-		    	r  = t-w;
-		    	w  = fn*pio2_3t-((t-r)-w);	
-		    	y[0] = r-w;
+			t  = r;	/* will cover all possible cases */
+			w  = fn*pio2_3;
+			r  = t-w;
+			w  = fn*pio2_3t-((t-r)-w);
+			y[0] = r-w;
 		    }
 		}
 	    }
 	    y[1] = (r-y[0])-w;
 	    return n;
 	}
-    /* 
+    /*
      * all other (large) arguments
      */
 	if(ex==0x7fff) {		/* x is inf or NaN */
Index: src/lib/libm/src/k_sincos.h
diff -u src/lib/libm/src/k_sincos.h:1.1 src/lib/libm/src/k_sincos.h:1.2
--- src/lib/libm/src/k_sincos.h:1.1	Sat Aug 27 08:31:59 2022
+++ src/lib/libm/src/k_sincos.h	Mon Aug 29 01:48:34 2022
@@ -4,10 +4,10 @@
  *
  * Developed at SunSoft, a Sun Microsystems, Inc. business.
  * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
+ * software is freely granted, provided that this notice
  * is preserved.
  * ====================================================
- * 
+ *
  * k_sin.c and k_cos.c merged by Steven G. Kargl.
  */
 
@@ -16,7 +16,7 @@
 __FBSDID("$FreeBSD: head/lib/msun/src/k_sincos.h 319047 2017-05-28 06:13:38Z mmel $");
 #endif
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: k_sincos.h,v 1.1 2022/08/27 08:31:59 christos Exp $");
+__RCSID("$NetBSD: k_sincos.h,v 1.2 2022/08/29 01:48:34 riastradh Exp $");
 #endif
 
 static const double
Index: src/lib/libm/src/k_sincosl.h
diff -u src/lib/libm/src/k_sincosl.h:1.1 src/lib/libm/src/k_sincosl.h:1.2
--- src/lib/libm/src/k_sincosl.h:1.1	Sat Aug 27 08:31:59 2022
+++ src/lib/libm/src/k_sincosl.h	Mon Aug 29 01:48:34 2022
@@ -5,7 +5,7 @@
  *
  * Developed at SunSoft, a Sun Microsystems, Inc. business.
  * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice 
+ * software is freely granted, provided that this notice
  * is preserved.
  * ====================================================
  *
@@ -17,7 +17,7 @@
 __FBSDID("$FreeBSD: head/lib/msun/src/k_sincosl.h 354520 2019-11-07 23:57:48Z lwhsu $");
 #endif
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: k_sincosl.h,v 1.1 2022/08/27 08:31:59 christos Exp $");
+__RCSID("$NetBSD: k_sincosl.h,v 1.2 2022/08/29 01:48:34 riastradh Exp $");
 #endif
 
 #if LDBL_MANT_DIG == 64		/* ld80 version of k_sincosl.c. */
@@ -108,7 +108,7 @@ S11 = -0.3868081337970196697067372429920
 S12 =  0.64038150078671872796678569586315881020659912139412e-25;
 
 static inline void
-__kernel_sincosl(long double x, long double y, int iy, long double *sn, 
+__kernel_sincosl(long double x, long double y, int iy, long double *sn,
     long double *cs)
 {
 	long double hz, r, v, w, z;
@@ -129,7 +129,7 @@ __kernel_sincosl(long double x, long dou
 
 	hz = z / 2;
 	w = 1 - hz;
-	r = z * (C1 + z * (C2 + z * (C3 + z * (C4 + z * (C5 + z * (C6 + 
+	r = z * (C1 + z * (C2 + z * (C3 + z * (C4 + z * (C5 + z * (C6 +
 	    z * (C7 + z * (C8 + z * (C9 + z * (C10 + z * C11))))))))));
 
 	*cs =  w + (((1 - w) - hz) + (z * r - x * y));

Index: src/lib/libm/src/s_sincos.c
diff -u src/lib/libm/src/s_sincos.c:1.4 src/lib/libm/src/s_sincos.c:1.5
--- src/lib/libm/src/s_sincos.c:1.4	Sun Aug 28 16:07:58 2022
+++ src/lib/libm/src/s_sincos.c	Mon Aug 29 01:48:34 2022
@@ -7,14 +7,14 @@
  * software is freely granted, provided that this notice
  * is preserved.
  * ====================================================
- * 
+ *
  * s_sin.c and s_cos.c merged by Steven G. Kargl.  Descriptions of the
  * algorithms are contained in the original files.
  */
 
 #include <sys/cdefs.h>
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: s_sincos.c,v 1.4 2022/08/28 16:07:58 he Exp $");
+__RCSID("$NetBSD: s_sincos.c,v 1.5 2022/08/29 01:48:34 riastradh Exp $");
 #endif
 #if 0
 __FBSDID("$FreeBSD: head/lib/msun/src/s_sincos.c 319047 2017-05-28 06:13:38Z mmel $");

Reply via email to