On Tue, Jan 13, 2015 at 5:08 PM, Sergey B Kirpichev <[email protected]>
wrote:

> On Wed, Jan 14, 2015 at 08:55:59AM +1000, Amit Saha wrote:
> > +1 for returning an empty list object - it's IMO user-friendly
>
> It's not friendly, it's broken.  No way to distinguish between
> "no solutions" and "I can't solve".
>

The current situation doesn't really distinguish that, though. It might
give the impression that it does, but that's a false impression.

Example: solve(cos(x) - x) raises NotImplementedError (it has solutions,
but they are not analytic). solve(exp(x)) gives [] (it has no complex
solutions). But solve(cos(x)**2 + sin(x)**2 - 1) gives [] (it is an
identity, so all x solve it), and solve(floor(x) - 5) gives
NotImplementedError (5.1 is a solution; this one is issue 7074)

That's why I suggested a Solve object, which could contain that metadata in
a more structured way (like Solve.is_all_solutions which would be
True/False/None). But for now, solve() already returns an empty list in
some cases, so it might as well always do that.


> Exception - only way to workarround this, but in next solve
> (see solveset.py) we should try unevaluated Solve object instead.
>

I agree let's try to do this better in the next iteration of solve().

Aaron Meurer


>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/20150113230825.GA18048%40darkstar.order.hcn-strela.ru
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6LfZvvaYqvTpJmJAuiT%3DvTji6HpRiT1LLnax8WN2OH8nA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to