Changed _c2 calculation to match cpp approach, addressing a problem for the case for f <= 0.
It's tempting to drop eatanhe as a separate function, and simplify the arguments passed,
since this is the only place it's used, but I opted to stick closer to Karney's code.
Adds geomath::eatanhe.
Interestingly, the previous approach seemed to faithfully match the approach used in Java and Python, which I think pass these tests. This may suggest some subtle math handling difference between C++/Rust and Java/Python (maybe in atanh?), or that I'm overlooking some other nuance. I'm just taking the alternate Karney approach that works for us, rather than digging any deeper into the underlying cause.
Changed _c2 calculation to match cpp approach, addressing a problem for the case for f <= 0. It's tempting to drop eatanhe as a separate function, and simplify the arguments passed, since this is the only place it's used, but I opted to stick closer to Karney's code. Adds geomath::eatanhe.
Interestingly, the previous approach seemed to faithfully match the approach used in Java and Python, which I think pass these tests. This may suggest some subtle math handling difference between C++/Rust and Java/Python (maybe in atanh?), or that I'm overlooking some other nuance. I'm just taking the alternate Karney approach that works for us, rather than digging any deeper into the underlying cause.
[ ] I added an entry to
CHANGES.md
if knowledge of this change could be valuable to users.