let rec solve e = if !integer_solve && is_diophantine_equation e then zsolve e else try let e' = qsolve e in [e'] with Exc.Valid -> []