Skip to content

Commit cc032ad

Browse files
Merge pull request #525 from folkertdev/sync-from-rust-2026-04-28
Sync from rust 2026 04 28
2 parents 9447da6 + b104260 commit cc032ad

3 files changed

Lines changed: 16 additions & 21 deletions

File tree

crates/core_simd/src/simd/num/float.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,13 +385,13 @@ macro_rules! impl_trait {
385385
#[inline]
386386
fn simd_min(self, other: Self) -> Self {
387387
// Safety: `self` and `other` are float vectors
388-
unsafe { core::intrinsics::simd::simd_fmin(self, other) }
388+
unsafe { core::intrinsics::simd::simd_minimum_number_nsz(self, other) }
389389
}
390390

391391
#[inline]
392392
fn simd_max(self, other: Self) -> Self {
393393
// Safety: `self` and `other` are floating point vectors
394-
unsafe { core::intrinsics::simd::simd_fmax(self, other) }
394+
unsafe { core::intrinsics::simd::simd_maximum_number_nsz(self, other) }
395395
}
396396

397397
#[inline]

crates/std_float/tests/float.rs

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,6 @@ macro_rules! unary_approx_test {
3333
}
3434
}
3535

36-
macro_rules! binary_approx_test {
37-
{ $scalar:tt, $($func:tt),+ } => {
38-
test_helpers::test_lanes! {
39-
$(
40-
fn $func<const LANES: usize>() {
41-
test_helpers::test_binary_elementwise_approx(
42-
&core_simd::simd::Simd::<$scalar, LANES>::$func,
43-
&$scalar::$func,
44-
&|_, _| true,
45-
16,
46-
)
47-
}
48-
)*
49-
}
50-
}
51-
}
52-
5336
macro_rules! ternary_test {
5437
{ $scalar:tt, $($func:tt),+ } => {
5538
test_helpers::test_lanes! {
@@ -76,7 +59,19 @@ macro_rules! impl_tests {
7659

7760
// https://github.com/rust-lang/miri/issues/3555
7861
unary_approx_test! { $scalar, sin, cos, exp, exp2, ln, log2, log10 }
79-
binary_approx_test! { $scalar, log }
62+
63+
// The implementation of log is a.ln() / b.ln(), so there are 2 inexact operations,
64+
// hence a larger ulps is needed.
65+
test_helpers::test_lanes! {
66+
fn log<const LANES: usize>() {
67+
test_helpers::test_binary_elementwise_approx(
68+
&core_simd::simd::Simd::<$scalar, LANES>::log,
69+
&$scalar::log,
70+
&|_, _| true,
71+
32,
72+
)
73+
}
74+
}
8075

8176
test_helpers::test_lanes! {
8277
fn fract<const LANES: usize>() {

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2026-03-18"
2+
channel = "nightly-2026-04-28"
33
components = ["rustfmt", "clippy", "miri", "rust-src"]

0 commit comments

Comments
 (0)