Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libm libm: Fix some whitespace issues in recent sincos a...



details:   https://anonhg.NetBSD.org/src/rev/558ed4720149
branches:  trunk
changeset: 369719:558ed4720149
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 29 01:48:34 2022 +0000

description:
libm: Fix some whitespace issues in recent sincos additions.

diffstat:

 lib/libm/ld128/e_rem_pio2l.h |  24 ++++++++++++------------
 lib/libm/ld80/e_rem_pio2l.h  |  24 ++++++++++++------------
 lib/libm/src/e_rem_pio2l.h   |  24 ++++++++++++------------
 lib/libm/src/k_sincos.h      |   6 +++---
 lib/libm/src/k_sincosl.h     |   8 ++++----
 lib/libm/src/s_sincos.c      |   4 ++--
 6 files changed, 45 insertions(+), 45 deletions(-)

diffs (279 lines):

diff -r 9b58f127b6d5 -r 558ed4720149 lib/libm/ld128/e_rem_pio2l.h
--- a/lib/libm/ld128/e_rem_pio2l.h      Sun Aug 28 22:22:41 2022 +0000
+++ b/lib/libm/ld128/e_rem_pio2l.h      Mon Aug 29 01:48:34 2022 +0000
@@ -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 @@
 #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 @@
                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 */
diff -r 9b58f127b6d5 -r 558ed4720149 lib/libm/ld80/e_rem_pio2l.h
--- a/lib/libm/ld80/e_rem_pio2l.h       Sun Aug 28 22:22:41 2022 +0000
+++ b/lib/libm/ld80/e_rem_pio2l.h       Mon Aug 29 01:48:34 2022 +0000
@@ -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 @@
 #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 @@
                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 */
diff -r 9b58f127b6d5 -r 558ed4720149 lib/libm/src/e_rem_pio2l.h
--- a/lib/libm/src/e_rem_pio2l.h        Sun Aug 28 22:22:41 2022 +0000
+++ b/lib/libm/src/e_rem_pio2l.h        Mon Aug 29 01:48:34 2022 +0000
@@ -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 @@
                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 */
diff -r 9b58f127b6d5 -r 558ed4720149 lib/libm/src/k_sincos.h
--- a/lib/libm/src/k_sincos.h   Sun Aug 28 22:22:41 2022 +0000
+++ b/lib/libm/src/k_sincos.h   Mon Aug 29 01:48:34 2022 +0000
@@ -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
diff -r 9b58f127b6d5 -r 558ed4720149 lib/libm/src/k_sincosl.h
--- a/lib/libm/src/k_sincosl.h  Sun Aug 28 22:22:41 2022 +0000
+++ b/lib/libm/src/k_sincosl.h  Mon Aug 29 01:48:34 2022 +0000
@@ -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 @@
 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 @@
 
        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));
diff -r 9b58f127b6d5 -r 558ed4720149 lib/libm/src/s_sincos.c
--- a/lib/libm/src/s_sincos.c   Sun Aug 28 22:22:41 2022 +0000
+++ b/lib/libm/src/s_sincos.c   Mon Aug 29 01:48:34 2022 +0000
@@ -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 $");



Home | Main Index | Thread Index | Old Index