about summary refs log tree commit diff
path: root/src/math/sqrt.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-03-19 22:07:43 -0400
committerRich Felker <dalias@aerifal.cx>2012-03-19 22:07:43 -0400
commit97721a5508415a2f10eb068e022093811c9ff8be (patch)
tree88e9ce153895ad949576fa7ce1eeee4b02286479 /src/math/sqrt.c
parentacb744921b73f5a73803e533e5e4a4896d164a26 (diff)
parent0cbb65479147ecdaa664e88cc2a5a925f3de502f (diff)
downloadmusl-97721a5508415a2f10eb068e022093811c9ff8be.tar.gz
musl-97721a5508415a2f10eb068e022093811c9ff8be.tar.xz
musl-97721a5508415a2f10eb068e022093811c9ff8be.zip
Merge remote branch 'nsz/master'
Diffstat (limited to 'src/math/sqrt.c')
-rw-r--r--src/math/sqrt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/math/sqrt.c b/src/math/sqrt.c
index 2ebd022b..b2775673 100644
--- a/src/math/sqrt.c
+++ b/src/math/sqrt.c
@@ -78,7 +78,7 @@
 
 #include "libm.h"
 
-static const double one = 1.0, tiny = 1.0e-300;
+static const double tiny = 1.0e-300;
 
 double sqrt(double x)
 {
@@ -161,13 +161,13 @@ double sqrt(double x)
 
 	/* use floating add to find out rounding direction */
 	if ((ix0|ix1) != 0) {
-		z = one - tiny; /* raise inexact flag */
-		if (z >= one) {
-			z = one + tiny;
+		z = 1.0 - tiny; /* raise inexact flag */
+		if (z >= 1.0) {
+			z = 1.0 + tiny;
 			if (q1 == (uint32_t)0xffffffff) {
 				q1 = 0;
 				q++;
-			} else if (z > one) {
+			} else if (z > 1.0) {
 				if (q1 == (uint32_t)0xfffffffe)
 					q++;
 				q1 += 2;