diff --git a/include/math_approx/src/inverse_trig_approx.hpp b/include/math_approx/src/inverse_trig_approx.hpp index 531f888..432c386 100644 --- a/include/math_approx/src/inverse_trig_approx.hpp +++ b/include/math_approx/src/inverse_trig_approx.hpp @@ -75,32 +75,23 @@ namespace inv_trig_detail if constexpr (order == 4) { const auto x_sq = x * x; - const auto num = x + x_sq * (S) 0.498001992540; const auto den = (S) 1 + x * (S) 0.481844539675 + x_sq * (S) 0.425470835319; - return num / den; } else if constexpr (order == 5 || order == 6) { const auto x_sq = x * x; - const auto num = (S) 0.177801521472 + x * (S) 0.116983970701; const auto den = (S) 1 + x * (S) 0.174763903018 + x_sq * (S) 0.473808187566; - return (x + x_sq * num) / den; } else if constexpr (order == 7) { const auto x_sq = x * x; - const auto num = (S) 0.274959104817 + (S) 0.351814748865 * x + (S) -0.0395798531406 * x_sq; const auto den = (S) 1 + x * ((S) 0.275079063405 + x * ((S) 0.683311392128 + x * (S) 0.0624877111229)); - return (x + x_sq * num) / den; - - // an -> 0.274959104817, ad -> 0.275079063405, bn -> 0.351814748865, bd \ - // -> 0.683311392128, cn -> -0.0395798531406, cd -> 0.0624877111229 } else { diff --git a/test/src/inverse_trig_approx_test.cpp b/test/src/inverse_trig_approx_test.cpp index d07946d..69c76e3 100644 --- a/test/src/inverse_trig_approx_test.cpp +++ b/test/src/inverse_trig_approx_test.cpp @@ -3,7 +3,7 @@ #include #include -/* + TEST_CASE ("Asin Approx Test") { #if ! defined(WIN32) @@ -120,7 +120,7 @@ TEST_CASE ("Acos Approx Test") 5.0e-3f); } } -*/ + TEST_CASE ("Atan Approx Test") { #if ! defined(WIN32)