Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Module « Crypto.Util.number »

Fonction ceil_shift - module Crypto.Util.number

Signature de la fonction ceil_shift

def ceil_shift(n, b) 

Description

ceil_shift.__doc__

Return ceil(n / 2**b) without performing any floating-point or division operations.

    This is done by right-shifting n by b bits and incrementing the result by 1
    if any '1' bits were shifted out.