Feat(compute): Write powers of fraction
This commit is contained in:
@@ -80,8 +80,17 @@ def mofraction_monumber(left, right):
|
||||
>>> a = MOFraction(3, 2)
|
||||
>>> b = MOnumber(2)
|
||||
>>> print(power(a, b))
|
||||
/
|
||||
> ^
|
||||
| > 3
|
||||
| > 2
|
||||
> ^
|
||||
| > 2
|
||||
| > 2
|
||||
"""
|
||||
raise NotImplementedError
|
||||
num = Tree("^", left.numerator, right)
|
||||
denom = Tree("^", left.denominator, right)
|
||||
return Tree("/", num, denom)
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user