#include <json.hpp>
|
| constexpr | diyfp (uint64_t f_, int e_) noexcept |
| |
Definition at line 9725 of file json.hpp.
| constexpr nlohmann::detail::dtoa_impl::diyfp::diyfp |
( |
uint64_t |
f_, |
|
|
int |
e_ |
|
) |
| |
|
inlinenoexcept |
| static diyfp nlohmann::detail::dtoa_impl::diyfp::mul |
( |
const diyfp & |
x, |
|
|
const diyfp & |
y |
|
) |
| |
|
inlinestaticnoexcept |
returns x * y
- Note
- The result is rounded. (Only the upper q bits are returned.)
Definition at line 9750 of file json.hpp.
References ccl_test_distances::h, and x.
9752 static_assert(
kPrecision == 64,
"internal error");
9777 const uint64_t u_lo =
x.f & 0xFFFFFFFF;
9778 const uint64_t u_hi =
x.f >> 32;
9779 const uint64_t v_lo = y.f & 0xFFFFFFFF;
9780 const uint64_t v_hi = y.f >> 32;
9782 const uint64_t p0 = u_lo * v_lo;
9783 const uint64_t p1 = u_lo * v_hi;
9784 const uint64_t p2 = u_hi * v_lo;
9785 const uint64_t p3 = u_hi * v_hi;
9787 const uint64_t p0_hi = p0 >> 32;
9788 const uint64_t p1_lo = p1 & 0xFFFFFFFF;
9789 const uint64_t p1_hi = p1 >> 32;
9790 const uint64_t p2_lo = p2 & 0xFFFFFFFF;
9791 const uint64_t p2_hi = p2 >> 32;
9793 uint64_t Q = p0_hi + p1_lo + p2_lo;
9804 Q += uint64_t{1} << (64 - 32 - 1);
9806 const uint64_t
h = p3 + p2_hi + p1_hi + (Q >> 32);
9808 return {
h,
x.e + y.e + 64};
static constexpr int kPrecision
static CCL_BEGIN_DECLS double x[111][8]
| static diyfp nlohmann::detail::dtoa_impl::diyfp::normalize |
( |
diyfp |
x | ) |
|
|
inlinestaticnoexcept |
normalize x such that the significand is >= 2^(q-1)
- Precondition
- x.f != 0
Definition at line 9815 of file json.hpp.
References x.
9819 while ((
x.f >> 63) == 0)
static CCL_BEGIN_DECLS double x[111][8]
| static diyfp nlohmann::detail::dtoa_impl::diyfp::normalize_to |
( |
const diyfp & |
x, |
|
|
const int |
target_exponent |
|
) |
| |
|
inlinestaticnoexcept |
normalize x such that the result has the exponent E
- Precondition
- e >= x.e and the upper e - x.e bits of x.f must be zero.
Definition at line 9832 of file json.hpp.
References x.
9834 const int delta =
x.e - target_exponent;
9837 assert(((
x.f << delta) >> delta) ==
x.f);
9839 return {
x.f << delta, target_exponent};
static CCL_BEGIN_DECLS double x[111][8]
| static diyfp nlohmann::detail::dtoa_impl::diyfp::sub |
( |
const diyfp & |
x, |
|
|
const diyfp & |
y |
|
) |
| |
|
inlinestaticnoexcept |
returns x - y
- Precondition
- x.e == y.e and x.f >= y.f
Definition at line 9738 of file json.hpp.
References x.
9743 return {
x.f - y.f,
x.e};
static CCL_BEGIN_DECLS double x[111][8]
| int nlohmann::detail::dtoa_impl::diyfp::e = 0 |
| uint64_t nlohmann::detail::dtoa_impl::diyfp::f = 0 |
| constexpr int nlohmann::detail::dtoa_impl::diyfp::kPrecision = 64 |
|
static |
The documentation for this struct was generated from the following file: