Open mlliarm opened 2 years ago
Implement the power(X, N) predicate, where X is an interval and N is a number, calculating thus X^N.
X
N
X^N
The definition of this can be found in Shary2021 page 40, and it is pretty much defined as the N-times multiplication of X with itself:
X^N = X*X*...*X, N times.
X^N = X*X*...*X
This should be calculated recursively:
X^N = X*X^(N-1).
X^N = X*X^(N-1)
Implement the power(X, N) predicate, where
X
is an interval andN
is a number, calculating thusX^N
.The definition of this can be found in Shary2021 page 40, and it is pretty much defined as the N-times multiplication of X with itself:
X^N = X*X*...*X
, N times.This should be calculated recursively:
X^N = X*X^(N-1)
.