Author: Lars Wassermann <lars.wasserm...@gmail.com> Branch: Changeset: r423:78905cdad21d Date: 2013-05-29 21:53 +0200 http://bitbucket.org/pypy/lang-smalltalk/changeset/78905cdad21d/
Log: fixed infinity-retrieval to be RPython-compatible diff --git a/spyvm/primitives.py b/spyvm/primitives.py --- a/spyvm/primitives.py +++ b/spyvm/primitives.py @@ -296,14 +296,15 @@ @expose_primitive(FLOAT_TIMES_TWO_POWER, unwrap_spec=[float, int]) def func(interp, s_frame, rcvr, arg): + from rpython.rlib.rfloat import INFINITY # http://www.python.org/dev/peps/pep-0754/ try: return interp.space.wrap_float(math.ldexp(rcvr, arg)) except OverflowError: if rcvr >= 0.0: - return model.W_Float(float('inf')) + return model.W_Float(INFINITY) else: - return model.W_Float(float('-inf')) + return model.W_Float(-INFINITY) @expose_primitive(FLOAT_SQUARE_ROOT, unwrap_spec=[float]) def func(interp, s_frame, f): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit