[pypy-svn] r15225 - in pypy/dist/pypy: module/math rpython rpython/module
ale at codespeak.net
ale at codespeak.net
Thu Jul 28 10:56:19 CEST 2005
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
Log:
added math.log (needed for lib-python)
Modified: pypy/dist/pypy/module/math/__init__.py
==============================================================================
--- pypy/dist/pypy/module/math/__init__.py (original)
+++ pypy/dist/pypy/module/math/__init__.py Thu Jul 28 10:56:16 2005
@@ -24,6 +24,7 @@
#'sqrt' : 'interp_math.sqrt',
'frexp' : 'interp_math.frexp',
#'degrees' : 'interp_math.degrees',
+ 'log' : 'interp_math.log',
'log10' : 'interp_math.log10',
'fmod' : 'interp_math.fmod',
#'atan' : 'interp_math.atan',
Modified: pypy/dist/pypy/rpython/extfunctable.py
==============================================================================
--- pypy/dist/pypy/rpython/extfunctable.py (original)
+++ pypy/dist/pypy/rpython/extfunctable.py Thu Jul 28 10:56:16 2005
@@ -84,6 +84,7 @@
declare(time.clock , float , 'll_time/clock')
declare(time.sleep , noneannotation, 'll_time/sleep')
declare(math.log10 , float , 'll_math/log10')
+declare(math.log , float , 'll_math/log')
declare(math.ceil , float , 'll_math/ceil')
declare(math.frexp , frexpannotation, 'll_math/frexp')
declare(math.atan2 , float , 'll_math/atan2')
Modified: pypy/dist/pypy/rpython/llinterp.py
==============================================================================
--- pypy/dist/pypy/rpython/llinterp.py (original)
+++ pypy/dist/pypy/rpython/llinterp.py Thu Jul 28 10:56:16 2005
@@ -408,4 +408,5 @@
# by default we route all logging messages to nothingness
# e.g. tests can then switch on logging to get more help
# for failing tests
-py.log.setconsumer('llinterp', None)
+from pypy.tool.ansi_print import ansi_log
+py.log.setconsumer('llinterp', ansi_log)
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
+
def ll_math_log10(x):
return math.log10(x)
ll_math_log10.suggested_primitive = True
More information about the Pypy-commit
mailing list