Browse Source

math: fix a bug in real::cbrt() that completely broke the function.

legacy
Sam Hocevar 5 years ago
parent
commit
5814dd4cf0
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/math/real.cpp

+ 1
- 1
src/math/real.cpp View File

@@ -821,7 +821,7 @@ template<> real cbrt(real const &x)
real third = inverse(real::R_3());
for (int i = 1; i <= x.bigit_count(); i *= 2)
{
ret = third * (x / (ret * ret) + (ret / 2));
ret = third * (x / (ret * ret) + (ret * 2));
}

return ret;


Loading…
Cancel
Save