[pypy-svn] pypy fast-forward: Try to fix translation: there is no ll_math_round function,

amauryfa commits-noreply at bitbucket.org
Mon Jan 17 00:03:18 CET 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: fast-forward
Changeset: r40738:13f9e5d199f6
Date: 2011-01-17 00:02 +0100
http://bitbucket.org/pypy/pypy/changeset/13f9e5d199f6/

Log:	Try to fix translation: there is no ll_math_round function, so use
	the implementation in rarithmetic.py instead.

diff --git a/pypy/rlib/rarithmetic.py b/pypy/rlib/rarithmetic.py
--- a/pypy/rlib/rarithmetic.py
+++ b/pypy/rlib/rarithmetic.py
@@ -156,8 +156,7 @@
         return math.exp(x) - 1.
 
 def round_away(x):
-    "NOT_RPYTHON"
-    # round() from libm
+    # round() from libm, which is not available on all platforms!
     absx = abs(x)
     if absx - math.floor(absx) >= .5:
         r = math.ceil(absx)


More information about the Pypy-commit mailing list