diff options
| author | Guillaume Chatelet <gchatelet@google.com> | 2024-01-23 17:30:19 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-23 17:30:19 +0100 |
| commit | 2856db0d3b691907e055265c10f3ccc9b04f594e (patch) | |
| tree | e513ffb77746d6f5ba227d8c28874378eb9061e6 /libc/test/src/math/exp_test.cpp | |
| parent | e1aa5b1fd12d548863cf73c1ec09f98fe89d117b (diff) | |
[libc][NFC] Remove `FPBits` cast operator (#79142)
The semantics for casting can range from "bitcast" (same representation)
to "different representation", to "type promotion". Here we remove the
cast operator and force usage of `get_val` as the only function to get
the floating point value, making the intent clearer and more consistent.
Diffstat (limited to 'libc/test/src/math/exp_test.cpp')
| -rw-r--r-- | libc/test/src/math/exp_test.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/test/src/math/exp_test.cpp b/libc/test/src/math/exp_test.cpp index 1de2d7507acc..454107f307d8 100644 --- a/libc/test/src/math/exp_test.cpp +++ b/libc/test/src/math/exp_test.cpp @@ -52,7 +52,7 @@ TEST_F(LlvmLibcExpTest, TrickyInputs) { 0xc0867a172ceb0990, // x=-0x1.67a172ceb099p+9 }; for (int i = 0; i < N; ++i) { - double x = double(FPBits(INPUTS[i])); + double x = FPBits(INPUTS[i]).get_val(); EXPECT_MPFR_MATCH_ALL_ROUNDING(mpfr::Operation::Exp, x, LIBC_NAMESPACE::exp(x), 0.5); } |
