Skip to content
Snippets Groups Projects
Commit cdf45aa6 authored by Abhinav Singh's avatar Abhinav Singh
Browse files

Merge branch 'messed_up' into FD_solver

parents 7130eebd 599dea07
No related branches found
No related tags found
No related merge requests found
Pipeline #2308 failed
......@@ -108,6 +108,24 @@ namespace openfpm
return (exponent == 0) ? 1 : (base * pow(base, exponent-1));
}
template<class T>
double intpowlog(const T x, unsigned const e)
{
if (e == 0) return 1.0;
if (e % 2 == 0)
{
double h = intpowlog(x, e / 2);
return h * h;
}
else
{
double h = intpowlog(x, e / 2);
return h * h * x;
}
}
/* \brief Return the positive modulo of a number
*
* # Example
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment