Nils Bruin writes:
>> ...
>> si = numpy.sign(xm-xf) + ((xm-xf)==0)
>> ...
>> si = numpy.sign(rat) + (rat == 0)
>> x = xf + si*max([abs(rat), tol1])
>> ...
>
> Ah shoot. That code is quite understandable. What they need is:
>
>
> si = numpy.sign(xm-x
On Sun, 08 Apr 2012 at 05:41PM -0700, Eviatar wrote:
> Is there a ticket for this? I've also encountered this before.
Let me add a "me too". I ran into this just a few days ago. Looks like a
ticket for it is: http://trac.sagemath.org/sage_trac/ticket/12032
Dan
--
--- Dan Drake
- http://mat
Is there a ticket for this? I've also encountered this before.
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage
> ...
> si = numpy.sign(xm-xf) + ((xm-xf)==0)
> ...
> si = numpy.sign(rat) + (rat == 0)
> x = xf + si*max([abs(rat), tol1])
> ...
Ah shoot. That code is quite understandable. What they need is:
si = numpy.sign(xm-xf)
if si == 0:
Yes, that's a bug. Something goes wrong in what gets fed to the
function:
def f(z):
v = sin(x)(x=z)
print "evaluating sin(%s)=%s"%(z,v)
return vsage: find_maximum_on_interval(f,0,2)
evaluating sin(0.7639320225)=0.691766183638
evaluating sin(1.2360679775)=0.944499585162
evaluating sin(1