[pypy-svn] pypy default: Implement isfinite on the JVM.
alex_gaynor
commits-noreply at bitbucket.org
Sun May 1 18:21:02 CEST 2011
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch:
Changeset: r43831:0d638ceaf7c4
Date: 2011-05-01 16:21 +0000
http://bitbucket.org/pypy/pypy/changeset/0d638ceaf7c4/
Log: Implement isfinite on the JVM.
diff --git a/pypy/translator/jvm/src/pypy/PyPy.java b/pypy/translator/jvm/src/pypy/PyPy.java
--- a/pypy/translator/jvm/src/pypy/PyPy.java
+++ b/pypy/translator/jvm/src/pypy/PyPy.java
@@ -1198,6 +1198,10 @@
return Double.isInfinite(x);
}
+ public boolean ll_math_isfinite(double x) {
+ return !Double.isNaN(x) && !Double.isInfinite(x);
+ }
+
private double check(double v) {
if (Double.isNaN(v))
interlink.throwValueError();
More information about the Pypy-commit
mailing list