how can I speed up bromberg?



>>>>> "Edwin" == Edwin Woollett <woollett at charter.net> writes:

    Ted> On Nov. 20, Ramond Toy wrote:
    Ted> ---------------------------------
    Ted> Oops. I've uploaded a new version that fixes this.
    Ted> 
    Ted> Unfortunately, it still takes a very long time.  My original test used
    Ted> the default parameters and it converged very quickly.  With your new
    Ted> parameters, I gave up after a minute or so.
    Ted> 
    Ted> But I think the problem is with the integrand, 1/(1+sqrt(x)).  I'm
    Ted> guessing the infinite slope at 0 is going to give lots of trouble.
    Ted> bromberg(g, 1/2, 1) returns instantly. bromberg(g,1/100,1) takes a
    Ted> little bit longer.
    Ted> ----------------------------------------

    Ted> The new version of bromberg.lisp,
    Ted> http://common-lisp.net/~rtoy/maxima/bromberg.lisp
    Ted> no longer gives a lisp error (gcl), but is extremely
    Ted> slow (I stopped the calculation after 13 min)
    Ted> if I ask for 20 digit precision for the same

[snip]

    Edwin> (%i9) brombergabs:1.0b-20;
    Edwin> (%o9) 1.0b-20

    Edwin> (%i10) bval : bromberg(g,1/2,1);
    Edwin> Maxima encountered a Lisp error:

    Edwin> Console interrupt.
    Edwin> -------------------------------------------

    Edwin> I stopped the calculation after 13 min.

What kind of machine are you running this on?

I finally got around to building maxima with gcl on the only machine I
have access to with a working gcl.  On that machine (an aging
Ultrasparc, 750 MHz), I get this with your example:

bromberg((1/(1+sqrt(x)),x,1/2,1);
Evaluation took 0.7300 seconds (0.7600 elapsed)
(%o15)      2.6909206998615507341183361093738044447610421970518b-1

So, that's less than one second on this ancient 750 MHz sparc box.

Since you take over 13 minutes, either your machine is a 1 MHz box,
or there's something weird with your version of gcl and/or maxima.

Ray