--- old/usr/src/lib/libm/common/Q/fmodl.c	2019-06-06 20:38:43.797013924 +0000
+++ new/usr/src/lib/libm/common/Q/fmodl.c	2019-06-06 20:38:43.812890215 +0000
@@ -22,6 +22,7 @@
 /*
  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  */
+
 /*
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
@@ -31,29 +32,24 @@
 
 #include "libm.h"
 
-static const int
-	is = -0x7fffffff - 1,
-	im = 0x0000ffff,
-	iu = 0x00010000;
-
-static const long double
-	zero = 0.0L,
-	one = 1.0L;
+static const int is = -0x7fffffff - 1, im = 0x0000ffff, iu = 0x00010000;
+static const long double zero = 0.0L, one = 1.0L;
 
 #ifdef __LITTLE_ENDIAN
-#define	__H0(x) *(3 + (int *) &x)
-#define	__H1(x) *(2 + (int *) &x)
-#define	__H2(x) *(1 + (int *) &x)
-#define	__H3(x) *(0 + (int *) &x)
+#define	__H0(x)		*(3 + (int *)&x)
+#define	__H1(x)		*(2 + (int *)&x)
+#define	__H2(x)		*(1 + (int *)&x)
+#define	__H3(x)		*(0 + (int *)&x)
 #else
-#define	__H0(x) *(0 + (int *) &x)
-#define	__H1(x) *(1 + (int *) &x)
-#define	__H2(x) *(2 + (int *) &x)
-#define	__H3(x) *(3 + (int *) &x)
+#define	__H0(x)		*(0 + (int *)&x)
+#define	__H1(x)		*(1 + (int *)&x)
+#define	__H2(x)		*(2 + (int *)&x)
+#define	__H3(x)		*(3 + (int *)&x)
 #endif
 
 long double
-fmodl(long double x, long double y) {
+fmodl(long double x, long double y)
+{
 	long double a, b;
 	int n, ix, iy, k, sx;
 	int hx;
@@ -74,21 +70,25 @@
 	y0 &= 0x7fffffff;
 
 	/* purge off exception values */
-	if (x0 >= 0x7fff0000 ||	/* !finitel(x) */
+	if (x0 >= 0x7fff0000 ||		/* !finitel(x) */
 	    (y0 > 0x7fff0000) || (y0 == 0x7fff0000 && ((y1 | y2 | y3) != 0)) ||
 	    (y0 | y1 | y2 | y3) == 0)	/* isnanl(y) || y = 0 */
 		return ((x * y) / (x * y));
+
 	a = fabsl(x);
 	b = fabsl(y);
+
 	if (a <= b) {
 		if (a < b)
 			return (x);
 		else
 			return (zero * x);
 	}
+
 	/* determine ix = ilogbl(x) */
-	if (x0 < iu) {		/* subnormal x */
+	if (x0 < iu) {			/* subnormal x */
 		ix = -16382;
+
 		while (x0 == 0) {
 			ix -= 16;
 			x0 = x1 >> 16;
@@ -96,6 +96,7 @@
 			x2 = (x2 << 16) | (x3 >> 16);
 			x3 = (x3 << 16);
 		}
+
 		while (x0 < iu) {
 			ix -= 1;
 			x0 = (x0 << 1) | (x1 >> 31);
@@ -109,8 +110,9 @@
 	}
 
 	/* determine iy = ilogbl(y) */
-	if (y0 < iu) {		/* subnormal y */
+	if (y0 < iu) {			/* subnormal y */
 		iy = -16382;
+
 		while (y0 == 0) {
 			iy -= 16;
 			y0 = y1 >> 16;
@@ -118,6 +120,7 @@
 			y2 = (y2 << 16) | (y3 >> 16);
 			y3 = (y3 << 16);
 		}
+
 		while (y0 < iu) {
 			iy -= 1;
 			y0 = (y0 << 1) | (y1 >> 31);
@@ -132,6 +135,7 @@
 
 	/* fix point fmod */
 	n = ix - iy;
+
 	while (n--) {
 		while (x0 == 0 && n >= 16) {
 			n -= 16;
@@ -140,6 +144,7 @@
 			x2 = (x2 << 16) | (x3 >> 16);
 			x3 = (x3 << 16);
 		}
+
 		while (x0 < iu && n >= 1) {
 			n -= 1;
 			x0 = (x0 << 1) | (x1 >> 31);
@@ -147,9 +152,11 @@
 			x2 = (x2 << 1) | (x3 >> 31);
 			x3 = (x3 << 1);
 		}
+
 		carry = 0;
 		z3 = x3 - y3;
 		carry = (z3 > x3);
+
 		if (carry == 0) {
 			z2 = x2 - y2;
 			carry = (z2 > x2);
@@ -157,6 +164,7 @@
 			z2 = x2 - y2 - 1;
 			carry = (z2 >= x2);
 		}
+
 		if (carry == 0) {
 			z1 = x1 - y1;
 			carry = (z1 > x1);
@@ -164,8 +172,10 @@
 			z1 = x1 - y1 - 1;
 			carry = (z1 >= x1);
 		}
+
 		z0 = x0 - y0 - carry;
-		if (z0 < 0) {	/* double x */
+
+		if (z0 < 0) {		/* double x */
 			x0 = x0 + x0 + ((x1 & is) != 0);
 			x1 = x1 + x1 + ((x2 & is) != 0);
 			x2 = x2 + x2 + ((x3 & is) != 0);
@@ -178,6 +188,7 @@
 					return (a);
 				}
 			}
+
 			/* x = z << 1 */
 			z0 = z0 + z0 + ((z1 & is) != 0);
 			z1 = z1 + z1 + ((z2 & is) != 0);
@@ -193,6 +204,7 @@
 	carry = 0;
 	z3 = x3 - y3;
 	carry = (z3 > x3);
+
 	if (carry == 0) {
 		z2 = x2 - y2;
 		carry = (z2 > x2);
@@ -200,6 +212,7 @@
 		z2 = x2 - y2 - 1;
 		carry = (z2 >= x2);
 	}
+
 	if (carry == 0) {
 		z1 = x1 - y1;
 		carry = (z1 > x1);
@@ -207,19 +220,23 @@
 		z1 = x1 - y1 - 1;
 		carry = (z1 >= x1);
 	}
+
 	z0 = x0 - y0 - carry;
+
 	if (z0 >= 0) {
 		x0 = z0;
 		x1 = z1;
 		x2 = z2;
 		x3 = z3;
 	}
+
 	/* convert back to floating value and restore the sign */
 	if ((x0 | x1 | x2 | x3) == 0) {
 		__H0(a) = hx & is;
 		__H1(a) = __H2(a) = __H3(a) = 0;
 		return (a);
 	}
+
 	while (x0 < iu) {
 		if (x0 == 0) {
 			iy -= 16;
@@ -242,9 +259,10 @@
 		__H1(a) = x1;
 		__H2(a) = x2;
 		__H3(a) = x3;
-	} else {		/* subnormal output */
+	} else {			/* subnormal output */
 		n = -16382 - iy;
 		k = n & 31;
+
 		if (k != 0) {
 			if (k <= 16) {
 				x3 = (x2 << (32 - k)) | (x3 >> k);
@@ -258,6 +276,7 @@
 				x0 = 0;
 			}
 		}
+
 		while (n >= 32) {
 			n -= 32;
 			x3 = x2;
@@ -265,11 +284,13 @@
 			x1 = x0;
 			x0 = 0;
 		}
+
 		__H0(a) = x0 | sx;
 		__H1(a) = x1;
 		__H2(a) = x2;
 		__H3(a) = x3;
 		a *= one;
 	}
+
 	return (a);
 }
