Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Mpmath can give you the error message

f=lambda q:((q+.2*(40. - q))^-0.5)/((40.-q+.2*(q))^-0.5) -( ((q+.2*(40. - q))^.5-(50.)^.5+(50.-8.)^.5)/((40.-q+.2*(q))^0.5-(50.)^.5+(50.-32.)^.5))

from mpmath import *
mp.dps = 15; mp.pretty = True
s1=findroot(f,11)
print s1            # no error message
s1=findroot(f,40)   # error message