Skip to content

Commit

Permalink
Merge pull request #969 from xtensor-stack/feature/accurate-sincos
Browse files Browse the repository at this point in the history
Fix sincos implementation to cope with Emscripten
  • Loading branch information
JohanMabille authored Nov 10, 2023
2 parents 7bc4dd0 + c3f7bdd commit e9bd979
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions include/xsimd/arch/generic/xsimd_generic_math.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -974,12 +974,8 @@ namespace xsimd
template <class A, class T>
inline batch<std::complex<T>, A> polar(const batch<T, A>& r, const batch<T, A>& theta, requires_arch<generic>) noexcept
{
#ifndef EMSCRIPTEN
auto sincosTheta = sincos(theta);
return { r * sincosTheta.second, r * sincosTheta.first };
#else
return { r * cos(theta), r * sin(theta) };
#endif
}

// fdim
Expand Down

0 comments on commit e9bd979

Please sign in to comment.