Carl Banks wrote:
For instance, say you are using an implementation that uses
> floating point, and you define a function that uses Newton's
> method to find a square root:
def square_root(N,x=None):
if x is None:
x = N/2
for i in range(100):
x = (x + N/x)/2
return x
It works pretty well on your floating-point implementation.
> Now try running it on an implementation that uses fractions
> by default....
(Seriously, try running this function with N as a Fraction.)
Okay, will this thing ever stop? It's been running for 90 minutes now.
Is it just incredibly slow?
Any enlightenment appreciated!
~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list