Demo entry 2803122

findzero

   

Submitted by anonymous on Oct 02, 2015 at 02:57
Language: Python 3. Code size: 253 Bytes.

def findzero(f,paso):
    total=0
    while f(total)>=0:
        total+=paso
    try:
        return brentq(f,total-paso,total)
    except ValueError:
        #esperando que parche errores para algunos w
        return bisect(f,total-paso,total)

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).