Source

pypy / lib_pypy / cmath.py

Diff from to

lib_pypy/cmath.py

 
 # much code borrowed from mathmodule.c
 
-import math, __pypy__
+import math
 from math import e, pi
 
+try: from __pypy__ import builtinify
+except ImportError: builtinify = lambda f: f
+
 
 # constants
 _one = complex(1., 0.)
     return complex(real, imag)
 
 
-@__pypy__.builtinify
+@builtinify
 def acos(x):
     """acos(x)
 
     return -(_prodi(log((x+(_i*sqrt((_one-(x*x))))))))
 
 
-@__pypy__.builtinify
+@builtinify
 def acosh(x):
     """acosh(x)
 
     return z+z
 
 
-@__pypy__.builtinify
+@builtinify
 def asin(x):
     """asin(x)
 
     return -(_prodi(log((sqrt_1_minus_x_sq+_prodi(x)))))
 
 
-@__pypy__.builtinify
+@builtinify
 def asinh(x):
     """asinh(x)
 
     return z+z
 
 
-@__pypy__.builtinify
+@builtinify
 def atan(x):
     """atan(x)
     
     return _halfi*log(((_i+x)/(_i-x)))
 
 
-@__pypy__.builtinify
+@builtinify
 def atanh(x):
     """atanh(x)
 
     return _half*log((_one+x)/(_one-x))
 
 
-@__pypy__.builtinify
+@builtinify
 def cos(x):
     """cos(x)
 
     return complex(real, imag)
 
 
-@__pypy__.builtinify
+@builtinify
 def cosh(x):
     """cosh(x)
     
     return complex(real, imag)
 
 
-@__pypy__.builtinify
+@builtinify
 def exp(x):
     """exp(x)
     
     return complex(real, imag)
 
 
-@__pypy__.builtinify
+@builtinify
 def log(x, base=None):
     """log(x)
 
     return complex(real, imag)
 
 
-@__pypy__.builtinify
+@builtinify
 def log10(x):
     """log10(x)
 
     return complex(real, imag)
 
 
-@__pypy__.builtinify
+@builtinify
 def sin(x):
     """sin(x)
 
     return complex(real, imag)
 
 
-@__pypy__.builtinify
+@builtinify
 def sinh(x):
     """sinh(x)
 
     return complex(real, imag)
 
 
-@__pypy__.builtinify
+@builtinify
 def sqrt(x):
     """sqrt(x)
 
 _sqrt_half = sqrt(_half)
 
 
-@__pypy__.builtinify
+@builtinify
 def tan(x):
     """tan(x)
 
     return complex(real, imag)
 
 
-@__pypy__.builtinify
+@builtinify
 def tanh(x):
     """tanh(x)