mlliarm / ia

An interval arithmetic library in Logtalk
Apache License 2.0
2 stars 0 forks source link

Power predicate #15

Open mlliarm opened 2 years ago

mlliarm commented 2 years ago

Implement the power(X, N) predicate, where X is an interval and N is a number, calculating thus 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.

This should be calculated recursively:

X^N = X*X^(N-1).