We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 400c7c7 commit cad8352Copy full SHA for cad8352
libc/test/src/math/smoke/FmaTest.h
@@ -67,12 +67,14 @@ class FmaTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest {
67
out.min_normal));
68
69
if constexpr (sizeof(OutType) < sizeof(InType)) {
70
+ InFPBits tmp = InFPBits::one();
71
+ tmp.set_biased_exponent(InFPBits::EXP_BIAS - InFPBits::FRACTION_LEN - 1);
72
+ InType reciprocal_value = tmp.get_val();
73
+
74
InType v = InFPBits(static_cast<InStorageType>(IN_MIN_NORMAL_U +
75
InStorageType(1)))
76
.get_val();
- EXPECT_FP_EQ(
- out.min_normal,
- func(InType(1) / InType(IN_MIN_NORMAL_U << 1), v, out.min_normal));
77
+ EXPECT_FP_EQ(out.min_normal, func(reciprocal_value, v, out.min_normal));
78
}
79
80
// Test overflow.
0 commit comments