-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
.sqrt() has a wrong behaviour for negative floats #7347
Comments
This appears to be a problem with optimizations. With optimizations disabled the correct value is printed. This may be another case which #7115 addresses |
It happened on rusti in IRC. I was told that it doesn't use -O |
Are you sure?
|
I am not sure, I am building the newest master now and then I test again. But you are probably right that it only happens on -O |
Yes -O is the problem |
the bot on irc uses rustc without -O (if that's helpful) |
#7115 has landed, this should be fixed now. |
FIx FP in `missing_safety_doc` lint Fix FP where lint souldn't fire if any parent has `#[doc(hidden)]` attribute fixes: rust-lang#7347 changelog: [`missing_safety_doc`] Fix FP if any parent has `#[doc(hidden)]` attribute
-0.5f.sqrt().is_NaN evaluates to false on "df166ba"
The text was updated successfully, but these errors were encountered: