Skip to content

Commit 2c3eb6d

Browse files
RalfJunggitbot
authored and
gitbot
committedMar 6, 2025
add stdarch compatibility hack
1 parent e593e9a commit 2c3eb6d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 

‎core/src/intrinsics/mod.rs

+12
Original file line numberDiff line numberDiff line change
@@ -2785,6 +2785,12 @@ pub fn round_ties_even_f32(x: f32) -> f32 {
27852785
unsafe { rintf32(x) }
27862786
}
27872787

2788+
/// Provided for compatibility with stdarch. DO NOT USE.
2789+
#[inline(always)]
2790+
pub unsafe fn rintf32(x: f32) -> f32 {
2791+
round_ties_even_f32(x)
2792+
}
2793+
27882794
/// Returns the nearest integer to an `f64`. Rounds half-way cases to the number with an even
27892795
/// least significant digit.
27902796
///
@@ -2812,6 +2818,12 @@ pub fn round_ties_even_f64(x: f64) -> f64 {
28122818
unsafe { rintf64(x) }
28132819
}
28142820

2821+
/// Provided for compatibility with stdarch. DO NOT USE.
2822+
#[inline(always)]
2823+
pub unsafe fn rintf64(x: f64) -> f64 {
2824+
round_ties_even_f64(x)
2825+
}
2826+
28152827
/// Returns the nearest integer to an `f128`. Rounds half-way cases to the number with an even
28162828
/// least significant digit.
28172829
///

0 commit comments

Comments
 (0)
Please sign in to comment.