Skip to content

Commit 23bc374

Browse files
committed
remove overflowing f16 literal
1 parent 9ba0a3f commit 23bc374

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

crates/core_arch/src/x86/avx512fp16.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23993,16 +23993,16 @@ mod tests {
2399323993

2399423994
#[simd_test(enable = "avx512fp16,avx512vl")]
2399523995
const fn test_mm256_reduce_mul_ph() {
23996-
let a = _mm256_set1_ph(2.0);
23996+
let a = _mm256_set1_ph(1.1);
2399723997
let r = _mm256_reduce_mul_ph(a);
23998-
assert_eq!(r, 65536.0);
23998+
assert_eq!(r, 1.1f16.powi(16));
2399923999
}
2400024000

2400124001
#[simd_test(enable = "avx512fp16")]
2400224002
const fn test_mm512_reduce_mul_ph() {
24003-
let a = _mm512_set1_ph(2.0);
24003+
let a = _mm512_set1_ph(1.1);
2400424004
let r = _mm512_reduce_mul_ph(a);
24005-
assert_eq!(r, 16777216.0);
24005+
assert_eq!(r, 1.1f16.powi(32));
2400624006
}
2400724007

2400824008
#[simd_test(enable = "avx512fp16,avx512vl")]

0 commit comments

Comments
 (0)