On Mon, Mar 2, 2009 at 7:35 AM, mabshoff <mabsh...@googlemail.com> wrote: > On Mar 2, 6:15 am, Stan Schymanski <schym...@gmail.com> wrote: >> Dear all, >> >> I get a ZeroDivisionError: float division if I try to plot the >> following function: >> >> var('kab') >> fun = kab*((2*kab + 1)/(600*kab + 200) - (2*kab + 1)/(400*(kab + 1) + >> 200*kab))*((400*(kab + 1) + 200*kab)/(2*kab + 1) - (600*kab + 200)/ >> (2*kab + 1)) + 400*((2*kab + 1)/(400*(kab + 1) + 200*kab) - 1/400) + >> 200*((2*kab + 1)/(600*kab + 200) - 1/300) >> plot(fun,0.01,1) >> >> None of the denominators can turn 0 for positive kab, so I suppose >> that this is a bug. > > It is a problem in the axis code for some reason.
In particular: sage: fun.simplify_full() 1/3 it's a bug in the axis code when you try to plot a constant function. Carl --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---