get the high 64 bits from the vector, and if bits were truncated. this is to get the significant digits for the float.
| 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 |
no test coverage detected