On Jan 3, 2009, at 4:33 PM, calcp...@aol.com wrote: > Exactly, the function log base 2 of x is not defined at 0. > So, why won't sage return some sort of domain error?
Sage doesn't test to see if the function is defined on the whole domain (if this is even a decidable question in general, and I bet it's not), it just passes the expression to maxima and/or numpy. Of course, there is lots of room for improvement, and I don't like the current behavior. > I noticed something similar when I plotted (x^2-1)/(x-1) and got the > graph of x+1. > I was hoping for a removeable discontinuity to show in the graph! > IE a hole in y=x+1 at x=1. If you evaluate (x^2-1)/(x-1) at 100, or even 1000s of random points say, between 0 and 10, chances are very slim you'll try and evaluate it at the point x=1. Thus when you interpolate the rest of the graph it would come out as a straight line. Also, it's unclear how much of a "hole" you would want to see--mathematically even one pixel would be too large. It would be nice to do something more clever than evaluate at a bunch of points and "connect" the dots, but then there is no end to the amount of cleverness one could ask for. - Robert --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---