std::sqrt(std::complex<T>)
produces incorrect results for large real components
#122172
Labels
confirmed
Verified by a second party
floating-point
Floating-point math
libc++
libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
The following program produces an incorrect complex value due to floating-point numbers being unable to store a precise enough angle when converting to polar values.
Confirmed by @lntue.
The text was updated successfully, but these errors were encountered: