brendanzab/approx

Implement ApproxEq for num::Complex

Closed this issue · 4 comments

While this adds a dependency to num-complex, this would be very useful. I can prepare a PR if it would be accepted.

I think this might be useful. If you make this into an optional feature, users can explicitly opt into num-complex.

I guess you intend to implement this by comparing two floating point numbers with the same accuracy?

Sorry I didn't reply earlier. Somehow I missed this in my emails.

This would be useful, but I think I would rather the dependency go the other way. This would probably require stabilising approx though, and making the case for its inclusion in that library. Do we know who the principle maintainer is?

Perhaps we could make the case for adding an approx feature to the Cargo.toml?

cc. @cuviper

Given the wide use of num, I am very conservative with changes, and hesitant to add external dependencies to the public API. I already have the issue that its optional serde dependency is behind the times, with no clear path for bumping to serde-1.0 without a breaking change. So if we added approx at all, I'd want to wait for approx-1.0 and might never bump from there.

(Inter-crate semver is hard... I feel this is something the Rust ecosystem is still figuring out.)