numberOfTrailingZeros function