Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asinh of smallish value is infinite #73642

Closed
EbTech opened this issue Jun 23, 2020 · 2 comments
Closed

asinh of smallish value is infinite #73642

EbTech opened this issue Jun 23, 2020 · 2 comments
Labels
C-bug Category: This is a bug.

Comments

@EbTech
Copy link

EbTech commented Jun 23, 2020

With rustc version 1.44.1, the following expression evaluates to minus infinity, instead of the correct value of approximately -18.7:

fn main() {
    let x = (-67886600.94408971f64).asinh();
    assert!(!x.is_infinite());
}

Perhaps taking the absolute value of the first self in the implementation of asinh would make it more numerically stable?

@EbTech EbTech added the C-bug Category: This is a bug. label Jun 23, 2020
@robojumper
Copy link
Contributor

This is fixed on nightly with #72486. (playground)

@EbTech
Copy link
Author

EbTech commented Jun 23, 2020

Ah sorry, I should have checked!

@EbTech EbTech closed this as completed Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants