document rounding behavior of rint/nearbyint for ties
This commit is contained in:
parent
5cb2e7dfc3
commit
96acaff359
@ -1783,27 +1783,33 @@ extern "rust-intrinsic" {
|
|||||||
#[rustc_nounwind]
|
#[rustc_nounwind]
|
||||||
pub fn truncf64(x: f64) -> f64;
|
pub fn truncf64(x: f64) -> f64;
|
||||||
|
|
||||||
/// Returns the nearest integer to an `f32`. May raise an inexact floating-point exception
|
/// Returns the nearest integer to an `f32`. Changing the rounding mode is not possible in Rust,
|
||||||
/// if the argument is not an integer.
|
/// 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.
|
||||||
///
|
///
|
||||||
/// The stabilized version of this intrinsic is
|
/// The stabilized version of this intrinsic is
|
||||||
/// [`f32::round_ties_even`](../../std/primitive.f32.html#method.round_ties_even)
|
/// [`f32::round_ties_even`](../../std/primitive.f32.html#method.round_ties_even)
|
||||||
#[rustc_nounwind]
|
#[rustc_nounwind]
|
||||||
pub fn rintf32(x: f32) -> f32;
|
pub fn rintf32(x: f32) -> f32;
|
||||||
/// Returns the nearest integer to an `f64`. May raise an inexact floating-point exception
|
/// Returns the nearest integer to an `f64`. Changing the rounding mode is not possible in Rust,
|
||||||
/// if the argument is not an integer.
|
/// 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.
|
||||||
///
|
///
|
||||||
/// The stabilized version of this intrinsic is
|
/// The stabilized version of this intrinsic is
|
||||||
/// [`f64::round_ties_even`](../../std/primitive.f64.html#method.round_ties_even)
|
/// [`f64::round_ties_even`](../../std/primitive.f64.html#method.round_ties_even)
|
||||||
#[rustc_nounwind]
|
#[rustc_nounwind]
|
||||||
pub fn rintf64(x: f64) -> f64;
|
pub fn rintf64(x: f64) -> f64;
|
||||||
|
|
||||||
/// Returns the nearest integer to an `f32`.
|
/// Returns the nearest integer to an `f32`. Changing the rounding mode is not possible in Rust,
|
||||||
|
/// so this rounds half-way cases to the number with an even least significant digit.
|
||||||
///
|
///
|
||||||
/// This intrinsic does not have a stable counterpart.
|
/// This intrinsic does not have a stable counterpart.
|
||||||
#[rustc_nounwind]
|
#[rustc_nounwind]
|
||||||
pub fn nearbyintf32(x: f32) -> f32;
|
pub fn nearbyintf32(x: f32) -> f32;
|
||||||
/// Returns the nearest integer to an `f64`.
|
/// Returns the nearest integer to an `f64`. Changing the rounding mode is not possible in Rust,
|
||||||
|
/// so this rounds half-way cases to the number with an even least significant digit.
|
||||||
///
|
///
|
||||||
/// This intrinsic does not have a stable counterpart.
|
/// This intrinsic does not have a stable counterpart.
|
||||||
#[rustc_nounwind]
|
#[rustc_nounwind]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user