- Simplify shiftExponent().
- Clean up to_string() to prevent integers from including "e0".
- Fix root() and root2() computations by ensuring the mantissas have
  a consistent length.
This commit is contained in:
Ed Hennis
2026-01-27 12:56:16 -05:00
parent fc29fbe946
commit 3d6f57a4df
3 changed files with 142 additions and 66 deletions

View File

@@ -1159,6 +1159,9 @@ public:
}
};
auto const maxInternalMantissa =
power(10, Number::mantissaLog()) * 10 - 1;
auto const cSmall = std::to_array<Number>({
Number{2},
Number{2'000'000},
@@ -1169,6 +1172,9 @@ public:
Number{0},
Number{5625, -4},
Number{Number::largestMantissa},
maxInternalMantissa,
Number{Number::minMantissa(), 0, Number::unchecked{}},
Number{Number::maxMantissa(), 0, Number::unchecked{}},
});
test(cSmall);
bool caught = false;