mirror of https://github.com/Nonannet/copapy.git
pow function fixed in _math.py
This commit is contained in:
parent
662a168d90
commit
aacdc9b676
|
|
@ -79,10 +79,10 @@ def pow(x: VecNumLike, y: VecNumLike) -> Any:
|
|||
for _ in range(y - 1):
|
||||
m *= x
|
||||
return m
|
||||
if y == -1:
|
||||
return 1 / x
|
||||
if isinstance(x, value) or isinstance(y, value):
|
||||
return add_op('pow', [x, y])
|
||||
elif y == -1:
|
||||
return 1 / x
|
||||
else:
|
||||
return float(x ** y)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue