Summary
Taking the square root of some complex numbers can give incorrect results, when using num_complex::Complex<BigFloat> as type. For example
use num_complex::Complex; // 0.4.6
use num_bigfloat::{BigFloat, ONE}; // 1.7.1
fn main() {
let c = Complex::<BigFloat>::new(ONE, -ONE);
println!("{}", c.sqrt().powi(2)); // prints 1+i, but should be 1-i
}
The problem seems to be that c.sqrt() has a flipped sign in the imaginary part. Running the example with f64 gives the expected 1-i result.