Comment #13 on issue 1694 by nicolas.pourcelot: solve has many issues with fractions http://code.google.com/p/sympy/issues/detail?id=1694
"I think perhaps a single function should be added (isroot(), maybe?)" I thought about that too : >>> def checksolution(f, symbol, sol): >>> val = simplify(f.subs(symbol, sol)) >>> if val.is_zero(): >>> return True >>> elif val.is_nonzero(): >>> return False so someone else or either me may improve it easily later. "I believe you should "remove(0)" not "pop(0)"" Oops ! Thanks for catching this ! "Right now you use simplify and not .nonzero in one place but just a simple zero check in another. I still intend to use a simple checksolution(f, symbol, 0) however in last case, since we should not have issues with other solutions (or did I miss something ?). -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy-issues" group. To post to this group, send email to sympy-issues@googlegroups.com To unsubscribe from this group, send email to sympy-issues+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en -~----------~----~----~----~------~----~------~--~---