Viewing File: /usr/lib64/python2.7/site-packages/Crypto/Util/_number_new.pyc
ó
Â/¾Oc @ sŽ d Z d d d d d g Z d d l Z e j d d k rZ e j d
d
k rZ d d l Tn d „ Z d
„ Z d „ Z d „ Z e d „ Z
d S( s $Id$t
ceil_shiftt ceil_divt floor_divt
exact_log2t exact_diviÿÿÿÿNi i i ( t *c C s¥ t | t t f ƒ s, t | t t f ƒ rW t d t | ƒ j t | ƒ j f ƒ ‚ n | d k ro | d k su t ‚ d | >d } | | @r™ | | ?d S| | ?Sd S( sÏ 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.
s&