Skip to content
Snippets Groups Projects
Commit f738a61d authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Make LambertW compile

parent beb0efac
No related branches found
No related tags found
No related merge requests found
...@@ -324,15 +324,17 @@ template <double IterationStep(const double x, const double w)> ...@@ -324,15 +324,17 @@ template <double IterationStep(const double x, const double w)>
struct Iterator { struct Iterator {
static double Do(const int n, const double x, const double w) { static double Do(const int n, const double x, const double w) {
double tmpw = w;
for (int i = 0; i < n; ++i) for (int i = 0; i < n; ++i)
w = IterationStep(x, w); tmpw = IterationStep(x, tmpw);
return w; return tmpw;
} }
template <int n> static double Do(const double x, const double w) { template <int n> static double Do(const double x, const double w) {
double tmpw = w;
for (int i = 0; i < n; ++i) for (int i = 0; i < n; ++i)
w = IterationStep(x, w); tmpw = IterationStep(x, tmpw);
return w; return tmpw;
} }
template <int n, class = void> struct Depth { template <int n, class = void> struct Depth {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment