[Python-checkins] cpython (2.7): inline constant into its single use

benjamin.peterson python-checkins at python.org
Sat Dec 3 15:32:43 EST 2016


https://hg.python.org/cpython/rev/191cfde40203
changeset:   105437:191cfde40203
branch:      2.7
parent:      105430:6a3f50f1cfdb
user:        Benjamin Peterson <benjamin at python.org>
date:        Sat Dec 03 12:32:38 2016 -0800
summary:
  inline constant into its single use

files:
  Modules/_math.c |  3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)


diff --git a/Modules/_math.c b/Modules/_math.c
--- a/Modules/_math.c
+++ b/Modules/_math.c
@@ -22,7 +22,6 @@
 static const double ln2 = 6.93147180559945286227E-01;
 static const double two_pow_m28 = 3.7252902984619141E-09; /* 2**-28 */
 static const double two_pow_p28 = 268435456.0; /* 2**28 */
-static const double zero = 0.0;
 
 /* acosh(x)
  * Method :
@@ -143,7 +142,7 @@
 #ifdef Py_NAN
         return Py_NAN;
 #else
-        return x/zero;
+        return x/0.0;
 #endif
     }
     if (absx < two_pow_m28) {           /* |x| < 2**-28 */

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list