On Feb 1, 8:25 pm, "Krypto" <[EMAIL PROTECTED]> wrote:
> The correct answer as told to me by a person is
>
> (N>>3) + ((N-7*(N>>3))>>3)
>
> The above term always gives division by 7

No it doesn't.  The above term tends towards N * (9/64), with some
significant rounding errors.  9/64 is a fairly poor (6 bit)
approximation of 1/7 but the principle is the same as the solution I
proposed above.

Nicko

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to