num-complex
num-complex copied to clipboard
`Complex::sqrt()` does not produce cross-system reproducible results
In the current implementation, computing the argument of a complex number depends on the system math library's implementation of atan2, which is not guaranteed to produce exactly rounded (or otherwise portably reproducible) results. However, the principal complex square root can be computed using only the usual correctly rounded operations (+, -, *, /, sqrt), which are reproducible on all IEEE 754 systems.
Would #129 address that sufficiently? If not, do you have a problematic example?
Yes, that should work perfectly! Sorry, missed it when I was searching.