MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / hi64

Method hi64

Source/external/fast_float.h:2248–2272  ·  view source on GitHub ↗

get the high 64 bits from the vector, and if bits were truncated. this is to get the significant digits for the float.

Source from the content-addressed store, hash-verified

2246 // get the high 64 bits from the vector, and if bits were truncated.
2247 // this is to get the significant digits for the float.
2248 FASTFLOAT_CONSTEXPR20 uint64_t hi64(bool& truncated) const noexcept {
2249#ifdef FASTFLOAT_64BIT_LIMB
2250 if (vec.len() == 0) {
2251 return empty_hi64(truncated);
2252 } else if (vec.len() == 1) {
2253 return uint64_hi64(vec.rindex(0), truncated);
2254 } else {
2255 uint64_t result = uint64_hi64(vec.rindex(0), vec.rindex(1), truncated);
2256 truncated |= vec.nonzero(2);
2257 return result;
2258 }
2259#else
2260 if (vec.len() == 0) {
2261 return empty_hi64(truncated);
2262 } else if (vec.len() == 1) {
2263 return uint32_hi64(vec.rindex(0), truncated);
2264 } else if (vec.len() == 2) {
2265 return uint32_hi64(vec.rindex(0), vec.rindex(1), truncated);
2266 } else {
2267 uint64_t result = uint32_hi64(vec.rindex(0), vec.rindex(1), vec.rindex(2), truncated);
2268 truncated |= vec.nonzero(3);
2269 return result;
2270 }
2271#endif
2272 }
2273
2274 // compare two big integers, returning the large value.
2275 // assumes both are normalized. if the return value is

Callers 1

Calls 5

empty_hi64Function · 0.85
uint64_hi64Function · 0.85
uint32_hi64Function · 0.85
nonzeroMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected