On Wed, Jan 14, 2015 at 3:28 AM, Joachim Durchholz <[email protected]> wrote:

> Am 13.01.2015 um 23:53 schrieb Aaron Meurer:
>
>> Returning [] instead of raising NotImplementedError would probably not be
>> a
>> bad idea either
>>
>
> That would be confusable with a "we know that there is no solution" (1)
> result.
> In this case, we have a "we do not know what solutions exit" (2) result,
> which should be represented in a clearly distinguishable fashion (both on
> the console output and to other code).
> An exception should be a "the software has failed" result (3).
>
> SymPy currently does not distinguish between (2) and (3) and reports
> everything as a failure.
>

No, SymPy cannot distinguish (1) and (2).  If the software failed you
should get an exception that isn't NotImplementedError.


> One *could* usefully separate the two. That would require an explicit
> representation of "we do not know", which would have to generate useful
> output. Also, algorithms would need to recognize such ResultUnknown objects
> and either throw exceptions or do something more intelligent (such as
> trying another subalgorithm). It would require some extensive modifications
> to the code, so I don't see that happening quickly.


Exactly. This was part of Harsh's GSoC project last year. It is possible,
at least in some cases, to know that you have all the solutions to an
equation (take for example polynomials). But solve() as it exists now
doesn't keep track of any of that, and it shouldn't give the impression
that it does.

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/54B636CD.7070501%40durchholz.org.
>
> 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%3D6%2BVsZ9yWkCbZMv%2BAMtDLE41jCSx5sus9FTQ0Odqj51p3g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to