Hello,
I have a strange problem with the 'Romberg' function:
I try
MyFun(a,b,c,d):=ROMBERG(a,b,c,d);
and then
MyFun(SIN(x),x,0,6.28);
This results in an error message:
Error: ((%SIN SIMP) is not of type (OR RATIONAL LISP::FLOAT).
Fast links are on.
etc.
Can anybody give me a simple solution/explanation for this?
Another question, partly related: Some functions (among them ROMBERG)
produce an error, when nonnumeric arguments are given.
I would prefer to get 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) => error message.
I'd appreciate any help on this.
I tried to write a wrapper function
MyRomberg(a,b,c,d):=block(if(is(numberp(c) and numberp(d)) then
return(romberg(a,b,c,d)) else return(fundef(MyRomberg,[a,b,c,d])))
to handle non-numeric arguments, but this lead to the first problem :-(
Regards
Markus