1
Fork 0

intrinsics: unify rint, roundeven, nearbyint in a single round_ties_even intrinsic

This commit is contained in:
Ralf Jung 2025-02-04 15:15:28 +01:00
parent 019fc4de2f
commit 04e7a10af6
13 changed files with 111 additions and 208 deletions

View file

@ -129,7 +129,7 @@ impl f128 {
#[unstable(feature = "f128", issue = "116909")]
#[must_use = "method returns a new number and does not mutate the original value"]
pub fn round_ties_even(self) -> f128 {
unsafe { intrinsics::rintf128(self) }
unsafe { intrinsics::round_ties_even_f128(self) }
}
/// Returns the integer part of `self`.

View file

@ -129,7 +129,7 @@ impl f16 {
#[unstable(feature = "f16", issue = "116909")]
#[must_use = "method returns a new number and does not mutate the original value"]
pub fn round_ties_even(self) -> f16 {
unsafe { intrinsics::rintf16(self) }
unsafe { intrinsics::round_ties_even_f16(self) }
}
/// Returns the integer part of `self`.

View file

@ -125,7 +125,7 @@ impl f32 {
#[stable(feature = "round_ties_even", since = "1.77.0")]
#[inline]
pub fn round_ties_even(self) -> f32 {
unsafe { intrinsics::rintf32(self) }
unsafe { intrinsics::round_ties_even_f32(self) }
}
/// Returns the integer part of `self`.

View file

@ -125,7 +125,7 @@ impl f64 {
#[stable(feature = "round_ties_even", since = "1.77.0")]
#[inline]
pub fn round_ties_even(self) -> f64 {
unsafe { intrinsics::rintf64(self) }
unsafe { intrinsics::round_ties_even_f64(self) }
}
/// Returns the integer part of `self`.