get the number of leading zeros in the bigint.
| 2142 | |
| 2143 | // get the number of leading zeros in the bigint. |
| 2144 | int ctlz() const noexcept { |
| 2145 | if (vec.is_empty()) { |
| 2146 | return 0; |
| 2147 | } else { |
| 2148 | #ifdef FASTFLOAT_64BIT_LIMB |
| 2149 | return leading_zeroes(vec.rindex(0)); |
| 2150 | #else |
| 2151 | // no use defining a specialized leading_zeroes for a 32-bit type. |
| 2152 | uint64_t r0 = vec.rindex(0); |
| 2153 | return leading_zeroes(r0 << 32); |
| 2154 | #endif |
| 2155 | } |
| 2156 | } |
| 2157 | |
| 2158 | // get the number of bits in the bigint. |
| 2159 | int bit_length() const noexcept { |
nothing calls this directly
no test coverage detected