about summary refs log tree commit diff
path: root/math/s_csqrtf.c
diff options
context:
space:
mode:
Diffstat (limited to 'math/s_csqrtf.c')
-rw-r--r--math/s_csqrtf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/math/s_csqrtf.c b/math/s_csqrtf.c
index 7f45cc1320..f7dc3b1cd1 100644
--- a/math/s_csqrtf.c
+++ b/math/s_csqrtf.c
@@ -104,10 +104,10 @@ __csqrtf (__complex__ float x)
 		__real__ x = 0.0f;
 	      __imag__ x = __scalbnf (__imag__ x, -2 * scale);
 	    }
-	  else if (fabsf (__real__ x) < FLT_MIN
-		   && fabsf (__imag__ x) < FLT_MIN)
+	  else if (fabsf (__real__ x) < 2.0f * FLT_MIN
+		   && fabsf (__imag__ x) < 2.0f * FLT_MIN)
 	    {
-	      scale = -(FLT_MANT_DIG / 2);
+	      scale = -((FLT_MANT_DIG + 1) / 2);
 	      __real__ x = __scalbnf (__real__ x, -2 * scale);
 	      __imag__ x = __scalbnf (__imag__ x, -2 * scale);
 	    }