bit
digits.
> i needed to implement this myself and was thinking of storing the digits
> of an integer in a list.
That's sort of what Python does except the "digits" are 15 bits,
not base 10. Doing it in base 10 would be a huge pain because of the
problems with base 10->b
. round(x,n) in (Python 2.4):
multiplies x by 10**n
adds .5
truncates
divides by 10**n.
Don't confuse this trick with giving us the correct result though,
it's still floating point:
>>> round(1.77499, 2)
1.78
--
Christopher A. Craig <[EMAIL PROTECTED]>
&qu
e are some very real performance reasons to
do it in C rather than Python (i.e. I'm manipulating the internals of
the numerator and denominator by hand for performance in the GCD
function)
--
Christopher A. Craig <[EMAIL PROTECTED]>
"I affirm brethren by the boasting in you which