Re: [Maxima] Romberg bug?



Hi Markus
   
Romberg function is macsyma macro,so we can not know How evaluated(or
treated)is a,b,c unless read a source.
But Romberg(a,b,c) is simple.
a is treated as quated function name.
So 
(C1) MyFun(a,b,c):=romberg(a,b,c) $
(C2) MyFun('SIN,0,6.28);
(D2)   5.073086625254864E-6
or
(C3) MyFun(sin,0,6.28); work same
(C4) v(x):=exp(x)$
(C5) MyFun('v,0,1.0);
(D6) 1.71828184221844

MyFun(v,0,1.0) work,but I think it is not good style.
Romberg(a,b,c,d) is more difficut.
thanks.(I appreciate  your work for Symaxx)

Gosei Furuya (go_furuya@infoseek.jp)

 
> Hello,
>  
> I have a strangeproblem with the 'Romberg' function:
> Itry
>  
> MyFun(a,b,c,d):=ROMBERG(a,b,c,d);
>  
> andthen
>  
> MyFun(SIN(x),x,0,6.28);
>  
> This results in anerror message:
> Error: ((%SIN SIMP)is not of type (OR RATIONAL LISP::FLOAT).
> Fast links areon.
> etc.
>  
> Can anybody give mea simple solution/explanation for this?
> Another question,partly related: Some functions (among them ROMBERG) produce an error, whennonnumeric arguments are given.
> I would prefer toget the noun form instead. For example:
>  
> INTEGRATE(a(x),x,lower,upper) =>INTEGRATE(a(x),x,lower,upper)
>  
> but
>  
> ROMBERG(a(x),x,lower,upper) => errormessage.
>  
> I'd appreciate anyhelp on this. 
> I tried to write awrapper function 
> MyRomberg(a,b,c,d):=block(if(is(numberp(c) andnumberp(d)) then return(romberg(a,b,c,d)) elsereturn(fundef(MyRomberg,[a,b,c,d])))
> to handlenon-numeric arguments, but this lead to the first problem:-(
>  
> Regards
>  
> Markus
>  
>