@@ -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-
5336macro_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 >( ) {
0 commit comments