On Sun, 29 Oct 2006 07:07:02 -0700, David Joyner <[EMAIL PROTECTED]>
wrote:
>
> Hi:
>
> In preparing a patch to fix the bugs in special.py reported a
> few days ago, I ran across the following odd feature:
>
> sage: f = lambda x: hypergeometric_U(1,1,x)
> sage: f(0.1)
> 2.0146425447084515
> sage: f(0.2)
> 1.4933487469322395
> sage: f(0.9)
> 0.63994922663929976
> sage: P = plot(f,0.1,0.9)
>
> hangs. Computes values just fine (and quickly). Hangs when it
> tries to plot.
>
> Can anyone explain this?
Rewrite the function as
def f(x):
print x
return hypergeometric_U(1,1,x)
then try again. Then you can see what value causes the hang.
Maybe something screwy happens when evaluating at a certain
point. Plotting evaluates at tons of points.
Incidentally, for all your maxima-wrapped special functions,
it would be good to make them classes with a plot method, e.g.,
def plot(....)
then the evaluation of the function at all points at which we
want to evaluate it could be done via one maxima call (though,
there could be no adaptive refinement, unless one wrote the code
for that in Maxima, which one should do, I suppose).
William
--~--~---------~--~----~------------~-------~--~----~
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/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---