Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Jan 6, 2024
1 parent 2db6631 commit 63b5e8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
9 changes: 0 additions & 9 deletions include/math_approx/src/inverse_trig_approx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
4 changes: 2 additions & 2 deletions test/src/inverse_trig_approx_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <iostream>

#include <math_approx/math_approx.hpp>
/*

TEST_CASE ("Asin Approx Test")
{
#if ! defined(WIN32)
Expand Down Expand Up @@ -120,7 +120,7 @@ TEST_CASE ("Acos Approx Test")
5.0e-3f);
}
}
*/

TEST_CASE ("Atan Approx Test")
{
#if ! defined(WIN32)
Expand Down

0 comments on commit 63b5e8b

Please sign in to comment.