"A simple implementation of Algorithm A from section 4.6.3 of TAOCP" as taken from:
http://alvaro-videla.com/2014/03/the-power-algorithm.html
"There’s a very well known algorithm for calculation powers, that is
x to the power of n or simply: x^n
. Donald Knuth
presents the algorithm in section 4.6.3 Evaluation of Powers
of TAOCP."
function powerInt extends Modelica.Icons.Function; input Real x "base"; input Integer n "exponent"; output Real y "result"; end powerInt;