BitLen calls (big.Int).BitLen.
()
| 442 | |
| 443 | // BitLen calls (big.Int).BitLen. |
| 444 | func (z *BigInt) BitLen() int { |
| 445 | if z.isInline() { |
| 446 | // Find largest non-zero inline word. |
| 447 | for i := len(z._inline) - 1; i >= 0; i-- { |
| 448 | if z._inline[i] != 0 { |
| 449 | return i*bits.UintSize + bits.Len(uint(z._inline[i])) |
| 450 | } |
| 451 | } |
| 452 | return 0 |
| 453 | } |
| 454 | var tmp1 big.Int //gcassert:noescape |
| 455 | return z.inner(&tmp1).BitLen() |
| 456 | } |
| 457 | |
| 458 | // Bits calls (big.Int).Bits. |
| 459 | func (z *BigInt) Bits() []big.Word { |