Commit b4c9ca28 authored by Stefan Behnel's avatar Stefan Behnel

tests for '**' operator

parent 9a8c817d
def f(obj1, obj2, obj3):
cdef float flt1, flt2, flt3
flt1 = flt2 ** flt3
obj1 = obj2 ** obj3
__doc__ = """
>>> f(1.0, 2.95)[0] == f(1.0, 2.95)[1]
True
>>> constant_py()
1024L
>>> constant_long() == 2L ** 36
True
"""
def f(obj2, obj3):
cdef float flt1, flt2, flt3
flt2, flt3 = obj2, obj3
flt1 = flt2 ** flt3
obj1 = obj2 ** obj3
return flt1, obj1
def constant_py():
result = 2L ** 10
return result
def constant_long():
result = 2L ** 36
return result
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment