38-complex.patch 692 B

1234567891011121314
  1. diff --git a/include/complex b/include/complex
  2. index 1e4d99d..5f09e3e 100644
  3. --- a/include/complex
  4. +++ b/include/complex
  5. @@ -1342,7 +1342,8 @@ _LIBCPP_HIDE_FROM_ABI complex<_Tp> acos(const complex<_Tp>& __x) {
  6. }
  7. if (std::__constexpr_isinf(__x.imag()))
  8. return complex<_Tp>(__pi / _Tp(2), -__x.imag());
  9. - if (__x.real() == 0 && (__x.imag() == 0 || std::isnan(__x.imag())))
  10. + // Somehow isnan can be a macro, so we use __constexpr_isnan
  11. + if (__x.real() == 0 && (__x.imag() == 0 || std::__constexpr_isnan(__x.imag())))
  12. return complex<_Tp>(__pi / _Tp(2), -__x.imag());
  13. complex<_Tp> __z = std::log(__x + std::sqrt(std::__sqr(__x) - _Tp(1)));
  14. if (std::signbit(__x.imag()))