diff Objects/unicodeobject.c @ 52404:019815bc37ea legacy-trunk

Issue #532631: Replace confusing fabs(x)/1e25 >= 1e25 test with fabs(x) >= 1e50, and fix documentation.
author Mark Dickinson <dickinsm@gmail.com>
date Sun, 29 Mar 2009 14:37:51 +0000
parents b846d709cb76
children f05b6d9adbe6
line wrap: on
line diff
--- a/Objects/unicodeobject.c	Sun Mar 29 10:19:05 2009 +0000
+++ b/Objects/unicodeobject.c	Sun Mar 29 14:37:51 2009 +0000
@@ -8286,7 +8286,7 @@
         return -1;
     if (prec < 0)
         prec = 6;
-    if (type == 'f' && (fabs(x) / 1e25) >= 1e25)
+    if (type == 'f' && fabs(x) >= 1e50)
         type = 'g';
     /* Worst case length calc to ensure no buffer overrun: