Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor speedup and accuracy improvement for atanh (#39267)
When `x` is not small, the numeric stability given by `log1p` and the rest of the complicated stuff actually just increases error and reduces speed. Also the small x and infinity case are just extra branches that already fall out of the remaining branches. The `<.5` branch is still both slower and has a higher max error (1.4 ULP vs .8 for the other branch), so if anyone can think of anything to improve it, I'm all ears. This PR is only a 20% speed improvement, but it's also a simplification so I think it's worthwhile.
- Loading branch information