private function bnNumBits(\GMP $x): int
    {
        $zero = \gmp_init(0, 10);
        if (Math::equals($x, $zero)) {
            return 0;
        }
        $log2 = 0;
        while (false === Math::equals($x, $zero)) {
            $x = Math::rightShift($x, 1);
            ++$log2;
        }

        return $log2;
    }
private function bnNumBits(\GMP $x): int
    {
        $zero = \gmp_init(0, 10);
        if (Math::equals($x, $zero)) {
            return 0;
        }
        $log2 = 0;
        while (false === Math::equals($x, $zero)) {
            $x = Math::rightShift($x, 1);
            ++$log2;
        }

        return $log2;
    }
private function bnNumBits ( \ GMP $ x ) : int { $ zero = \ gmp_init ( 0 , 10 ) ; if ( Math :: equals ( $ x , $ zero ) ) { return 0 ; } $ log2 = 0 ; while ( false === Math :: equals ( $ x , $ zero ) ) { $ x = Math :: rightShift ( $ x , 1 ) ; ++ $ log2 ; } return $ log2 ; }
Returns the number of bits used to store this number. Non-significant upper bits are not counted.

@see https://www.openssl.org/docs/crypto/BN_num_bytes.html
Returns the number of bits used to store this number . Non - significant upper bits are not counted .