diff options
| author | Ralf Jung <post@ralfj.de> | 2020-06-19 08:55:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-19 08:55:59 +0200 |
| commit | 99be102a6d18ec05178a0f55ece6c65f65e38c48 (patch) | |
| tree | b7cd435ac7928cae51b04cf00b88c77d01a8f767 /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 9c54c65c9d0b3e99f75dbacfaef52953a9a4d0a7 (diff) | |
| parent | 35a2915bf3f24edbbee2d6a9c8f2318304b99df3 (diff) | |
| download | rust-99be102a6d18ec05178a0f55ece6c65f65e38c48.tar.gz rust-99be102a6d18ec05178a0f55ece6c65f65e38c48.zip | |
Rollup merge of #72486 - Ralith:asinh-fix, r=dtolnay
Fix asinh of negative values Rust's current implementation of asinh has [large errors](https://www.wolframalpha.com/input/?i=arcsinh%28x%29%2C+ln%28x%2B%28x%5E2%2B1%29%5E0.5%29%2C+x+from+-67452095.07139316+to+0) in its negative range. ~These are (mostly) not numerical, but rather seem due to an incorrect implementation.~ This appears to be due to avoidable catastrophic cancellation. [Playground before/after](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=bd04ae6d86d06612e4e389a8b95d19ab). [glibc uses](https://github.com/bminor/glibc/blob/81dca813cc35f91414731fdd0ff6b756d5e1827f/sysdeps/ieee754/dbl-64/s_asinh.c#L56) abs here. Many thanks to @danieldeankon for finding this weird behavior, @jebrosen for diagnosing it, and @toasteater for identifying the probable implementation error!
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
