Skip to content

Commit

Permalink
Rollup merge of rust-lang#119782 - RalfJung:rint, r=cuviper
Browse files Browse the repository at this point in the history
rint intrinsics: caution against actually trying to check for floating-point exceptions
  • Loading branch information
matthiaskrgr authored Jan 10, 2024
2 parents 4571ef9 + fa5bef8 commit 3fcddf1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1787,6 +1787,8 @@ extern "rust-intrinsic" {
/// so this rounds half-way cases to the number with an even least significant digit.
///
/// May raise an inexact floating-point exception if the argument is not an integer.
/// However, Rust assumes floating-point exceptions cannot be observed, so this is not something that
/// can actually be used from Rust code.
///
/// The stabilized version of this intrinsic is
/// [`f32::round_ties_even`](../../std/primitive.f32.html#method.round_ties_even)
Expand All @@ -1796,6 +1798,8 @@ extern "rust-intrinsic" {
/// so this rounds half-way cases to the number with an even least significant digit.
///
/// May raise an inexact floating-point exception if the argument is not an integer.
/// However, Rust assumes floating-point exceptions cannot be observed, so this is not something that
/// can actually be used from Rust code.
///
/// The stabilized version of this intrinsic is
/// [`f64::round_ties_even`](../../std/primitive.f64.html#method.round_ties_even)
Expand Down

0 comments on commit 3fcddf1

Please sign in to comment.