Closed edgarcosta closed 2 years ago
@JRSijsling, @assaferan: I'm happy with the code. But uncertain about the name AlmostEqual
.
Please let me know what you think.
ps: There are certainly more places where we could use AlmostEqual
, but I just did the obvious things.
Yes, this makes complete sense and I will look for more places where this can be used. It will certainly help at multiple stages, also when calculating endomorphism rings at low precision.
Makes sense to me. I think that's pretty much the usual meaning of AlmostEqual.
This resolves #52, as it boils down to
as
but the right way to compare if two nonzero floating points are close to each other is not by absolute difference, but by their relative differences
, and voila, with the PR we get