﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1518	Implement faster pow() math for integer exponents	Martin Sjölund	Martin Sjölund	"r*r2*r3 is roughly 4 times faster than using pow() because we only have access to pow(double,double). Use for example something from http://en.wikipedia.org/wiki/Exponentiation_by_squaring

And implement a check for x^n (n is a literal that is actually an integer)

{{{
model M
  function f
    input Real r;
    output Real o;
  protected
    Real r2 := r,r3 := r;
  algorithm
    for i in 1:100000 loop
      //o := r*r2*r3;
      o := r^3;
      //o := sqrt(r);
    end for;
    o := 42.0;
  end f;
  parameter Real x(fixed=false);
initial equation
 x = f(time+10);
end M;
}}}"	defect	closed	high				fixed		Martin Sjölund
