Add pow support

This commit is contained in:
Iaroslav Postovalov 2020-10-12 20:36:05 +07:00
parent f0fbebd770
commit 84f7535fdd
No known key found for this signature in database
GPG Key ID: 46E15E4A31B3BCD7

View File

@ -58,6 +58,7 @@ public fun <X : SFun<X>> MST.sfun(proto: X): SFun<X> {
SpaceOperations.MINUS_OPERATION -> Sum(left.sfun(proto), Negative(right.sfun(proto)))
RingOperations.TIMES_OPERATION -> Prod(left.sfun(proto), right.sfun(proto))
FieldOperations.DIV_OPERATION -> Prod(left.sfun(proto), Power(right.sfun(proto), Negative(One())))
PowerOperations.POW_OPERATION -> Power(left.sfun(proto), SConst((right as MST.Numeric).value))
else -> error("Binary operation $operation not defined in $this")
}
}