Refactor normalize and clean up

This commit is contained in:
Victor Zverovich committed 2019-09-07 17:28:59 -07:00
1 parent 6649b8e0ca
commit ac71d853be
3 files changed
+31 -30

No files matched your search

+4 -4
View File
@@ -48,10 +48,10 @@ TEST(FPTest, ConstructFromDouble) {
}
TEST(FPTest, Normalize) {
auto v = fp(0xbeef, 42);
v.normalize();
EXPECT_EQ(0xbeef000000000000, v.f);
EXPECT_EQ(-6, v.e);
const auto v = fp(0xbeef, 42);
auto normalized = normalize(v);
EXPECT_EQ(0xbeef000000000000, normalized.f);
EXPECT_EQ(-6, normalized.e);
}
TEST(FPTest, ComputeBoundariesSubnormal) {