On Sat, Jan 3, 2009 at 4:48 PM, mabshoff <michael.absh...@mathematik.uni-dortmund.de> wrote: > > > > On Jan 3, 4:33 pm, calcp...@aol.com wrote: > > Hi AJG, > >> Exactly, the function log base 2 of x is not defined at 0. >> So, why won't sage return some sort of domain error? > > We call numpy for the numerical roots and I guess this might be a bug > there, but we will check. Somebody please open a ticket for this. > >> 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. > > Ouch, I think this might explain the problem: > > ---------------------------------------------------------------------- > | Sage Version 3.2.3.final, Release Date: 2009-01-02 | > | Type notebook() for the GUI, and license() for information. | > ---------------------------------------------------------------------- > sage: f=(x^2-1)/(x-1); f > (x^2 - 1)/(x - 1) > sage: f.simplify() > (x^2 - 1)/(x - 1) > sage: f.simplify_full() > x + 1 > sage: > > Not sure is this is an issue with Maxima, but I would guess so. > simplify_full() shouldn't do this since it is clearly mathematically > not equivalent.
It's documented in the Maxima documentation, where one finds "cancelling the greatest common divisor of the numerator and denominator..." in the docs for ratexpand, which is called in the course of the above. Who says simplify_full() shouldn't do the above? Mathematica also does the above simplification: sage: mathematica.eval('Simplify[(x^2-1)/(x-1)]') 1 + x I don't think there is any claim that simplify(expr) gives back a 100% mathematically equivalent expression. However, the types of changes that occur are well defined. > My suspicion is that we probably call simplify_full() > before plotting and/or feeding it into _fast_float(). Someone please > open another ticket for this one. I do not think fast_float calls simplify_full. William > >> TIA, >> AJG > > Cheers, > > Michael > >> A. Jorge Garcia >> Teacher and Professor >> Applied Math and Comp Sci >> Baldwin High and Nassau CC >> Long Island, NY, USA >> >> mailto:calcp...@aol.comftp://ftp.baldwinschools.nethttp://calcpage.tripod.com/bshs > > > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---