Commits

Philip Jenvey  committed 4d824e4

fix handling of inf in jvm's frexp

  • Participants
  • Parent commits 12052ff

Comments (0)

Files changed (1)

File pypy/translator/jvm/src/pypy/PyPy.java

         if (Double.isNaN(x))
             return interlink.recordFloatSigned(x, 0);
 
-        // Infinity: Python throws exception
+        // Infinity: Python returns (inf, 0)
         if (Double.isInfinite(x))
-            interlink.throwOverflowError();
+            return interlink.recordFloatSigned(x, 0);
 
         // Extract the various parts of the format:
         final long e=11, f=52; // number of bits in IEEE format