Ask Your Question

Revision history [back]

The solution here is to write the following:

try:
    if find_root(sin(x), 1, 2) in RR:
        print("roots")
except RuntimeError:
    print("no roots")

This will figure out IF there are roots in the specified interval, but won't tell you how many there are.