Marko Rauhamaa <ma...@pacujo.net> writes:
> And in fact, the sqrt optimization now makes the original version 20%
> faster: ...
>     bound = int(math.sqrt(n))

That could conceivably fail because of floating point roundoff or
overflow, e.g. fac(3**1000).  A fancier approach to finding the integer
square root might be worthwhile though.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to