Re: [pypy-svn] r15225 - in pypy/dist/pypy: module/math rpython rpython/module

Hi Anders, On Thu, Jul 28, 2005 at 10:56 +0200, ale@codespeak.net wrote:
Author: ale Date: Thu Jul 28 10:56:16 2005 New Revision: 15225
Modified: pypy/dist/pypy/module/math/__init__.py pypy/dist/pypy/rpython/extfunctable.py pypy/dist/pypy/rpython/llinterp.py pypy/dist/pypy/rpython/module/ll_math.py
we should try to add tests when adding new external function implementations. Otherwise we get frustrating errors in translation after running for >10 minutes.
Modified: pypy/dist/pypy/rpython/module/ll_math.py ============================================================================== --- pypy/dist/pypy/rpython/module/ll_math.py (original) +++ pypy/dist/pypy/rpython/module/ll_math.py Thu Jul 28 10:56:16 2005 @@ -2,6 +2,10 @@
import math
+def ll_math_log(x): + return math.log(x) +ll_math_log.suggested_primitive = True
'log' actually takes two arguments (see pypy/module/math/interp_math.py or plain python's math.log). On a related note, ll-external function implementations cannot have default arguments. cheers, holger

On Thu, Jul 28, 2005 at 14:03 +0200, holger krekel wrote:
+def ll_math_log(x): + return math.log(x) +ll_math_log.suggested_primitive = True
'log' actually takes two arguments (see pypy/module/math/interp_math.py or plain python's math.log).
Actually (i just got to know) that the C backend's log() only takes one argument so Carl Friedrich just fixed the invocation from the pypy/module/math module and now the two signatures match. holger
participants (2)
-
holger krekel
-
hpk@trillke.net