On Thursday, March 29, 2012 11:38:34 AM UTC+5:30, Joachim Durchholz wrote: > > Am 29.03.2012 04:16, schrieb Bharath M R: > > Sorry. I gave the wrong example. > > a**0.5> b will give an exception saying complex > > numbers cannot be compared. This functionality is right, but > > the exception won't help in plotting. I wan't to have a property > > which turns false seeing which of the arguments for a is negative. > > You can't compare complex numbers, but you can compare real and > imaginary parts. > > > It is possible to catch the exception and not plot the points where > > I received an exception. > > That sounds useful to me. > > The user needs to know that the plot is incomplete. > And, preferably, why (but be sure not to drown him in a gazillion > problem reports if a gazillion points can't be plotted. > The plot is not "incomplete". The user will be plotting on Real Cartesian coordinates and complex numbers are not part of it. Hence not plotting the points is the right way to do it and you need not give any information to the user that the plot is incomplete.
> The paper says it will give erroneous plots, > > which I am not sure. > > My guess is that he's talking about exceptions caused by software bugs > (as opposed to math failure). > In that case, the plot will not have all points. > > It is extremely hard to classify exceptions as "this is a failure of the > math" (i.e. domain errors) or "this is a software bug". > It is much better to filter out invalid-domain constellations before > running the function you're trying to plot. > > -- You received this message because you are subscribed to the Google Groups "sympy" group. To view this discussion on the web visit https://groups.google.com/d/msg/sympy/-/386ucCYdln4J. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
