#include <json.hpp>
|
constexpr | diyfp (std::uint64_t f_, int e_) noexcept |
|
|
std::uint64_t | f = 0 |
|
int | e = 0 |
|
Definition at line 12699 of file json.hpp.
constexpr nlohmann::detail::dtoa_impl::diyfp::diyfp |
( |
std::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 12724 of file json.hpp.
12726 static_assert(
kPrecision == 64,
"internal error");
12751 const std::uint64_t u_lo =
x.f & 0xFFFFFFFFu;
12752 const std::uint64_t u_hi =
x.f >> 32u;
12753 const std::uint64_t v_lo =
y.f & 0xFFFFFFFFu;
12754 const std::uint64_t v_hi =
y.f >> 32u;
12756 const std::uint64_t p0 = u_lo * v_lo;
12757 const std::uint64_t
p1 = u_lo * v_hi;
12758 const std::uint64_t p2 = u_hi * v_lo;
12759 const std::uint64_t p3 = u_hi * v_hi;
12761 const std::uint64_t p0_hi = p0 >> 32u;
12762 const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu;
12763 const std::uint64_t p1_hi = p1 >> 32u;
12764 const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu;
12765 const std::uint64_t p2_hi = p2 >> 32u;
12767 std::uint64_t Q = p0_hi + p1_lo + p2_lo;
12778 Q += std::uint64_t{1} << (64u - 32u - 1u);
12780 const std::uint64_t
h = p3 + p2_hi + p1_hi + (Q >> 32u);
12782 return {
h,
x.e +
y.e + 64};
process_name opflash particleana ie x
static constexpr int kPrecision
process_name opflash particleana ie ie y
physics associatedGroupsWithLeft p1
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 12789 of file json.hpp.
12793 while ((
x.f >> 63u) == 0)
process_name opflash particleana ie x
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 12806 of file json.hpp.
12808 const int delta =
x.e - target_exponent;
12810 assert(delta >= 0);
12811 assert(((
x.f << delta) >> delta) ==
x.f);
12813 return {
x.f << delta, target_exponent};
process_name opflash particleana ie x
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 12712 of file json.hpp.
12714 assert(
x.e ==
y.e);
12715 assert(
x.f >=
y.f);
12717 return {
x.f -
y.f,
x.e};
process_name opflash particleana ie x
process_name opflash particleana ie ie y
int nlohmann::detail::dtoa_impl::diyfp::e = 0 |
std::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: