get the number of leading zeros in the bigint.
| 2359 | |
| 2360 | // get the number of leading zeros in the bigint. |
| 2361 | FASTFLOAT_CONSTEXPR20 int ctlz() const noexcept { |
| 2362 | if (vec.is_empty()) { |
| 2363 | return 0; |
| 2364 | } else { |
| 2365 | #ifdef FASTFLOAT_64BIT_LIMB |
| 2366 | return leading_zeroes(vec.rindex(0)); |
| 2367 | #else |
| 2368 | // no use defining a specialized leading_zeroes for a 32-bit type. |
| 2369 | uint64_t r0 = vec.rindex(0); |
| 2370 | return leading_zeroes(r0 << 32); |
| 2371 | #endif |
| 2372 | } |
| 2373 | } |
| 2374 | |
| 2375 | // get the number of bits in the bigint. |
| 2376 | FASTFLOAT_CONSTEXPR20 int bit_length() const noexcept { |
nothing calls this directly
no test coverage detected