Standard library / math/big
big.Int.TrailingZeroBits()
Count consecutive low zero bits of the absolute magnitude; zero returns zero. Expected stdout: '3 0\n'.
Formal Syntax & Structure
go syntaxgo
func (x *Int) TrailingZeroBits() uintReturn Value
uint
Returns the result described above; see the example for the observed behavior.
Working Example
Example Snippetgo
package main
import ( "fmt" "math/big")
func main() { fmt.Println(big.NewInt(-40).TrailingZeroBits(), big.NewInt(0).TrailingZeroBits())}