mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-21 14:20:56 +00:00
fixup! fixup! Step 1: Convert Number to use 128-bit numbers internally
This commit is contained in:
@@ -63,6 +63,12 @@ public:
|
||||
// add a digit
|
||||
void
|
||||
push(numberuint128 d) noexcept;
|
||||
#ifdef _MSC_VER
|
||||
void
|
||||
push(numberint128 d) noexcept;
|
||||
void
|
||||
push(std::int64_t d) noexcept;
|
||||
#endif
|
||||
|
||||
// recover a digit
|
||||
unsigned
|
||||
@@ -103,6 +109,20 @@ Number::Guard::push(numberuint128 d128) noexcept
|
||||
digits_ |= (d & 0x0000'0000'0000'000FULL) << 60;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
void
|
||||
Number::Guard::push(numberint128 d) noexcept
|
||||
{
|
||||
push(static_cast<numberuint128>(d));
|
||||
}
|
||||
|
||||
void
|
||||
Number::Guard::push(std::int64_t d) noexcept
|
||||
{
|
||||
push(static_cast<numberuint128>(d));
|
||||
}
|
||||
#endif
|
||||
|
||||
inline unsigned
|
||||
Number::Guard::pop() noexcept
|
||||
{
|
||||
|
||||
@@ -745,6 +745,8 @@ public:
|
||||
Number maxInt64{std::numeric_limits<std::int64_t>::max()};
|
||||
BEAST_EXPECT(maxInt64.exponent() <= 0);
|
||||
|
||||
// TODO: square maxInt64 and square Number::max()
|
||||
|
||||
using namespace boost::multiprecision;
|
||||
// maxint64 9,223,372,036,854,775,808
|
||||
int128_t minMantissa{1'000'000'000'000'000'000LL};
|
||||
|
||||
Reference in New Issue
Block a user