Question: How do I integrate compiled function?

June 10 2012 slizovskiy 25


I have a compiled function and want to integrate it numerically.  The integration procedure first tries to evaluate the integrand with symbolic values and return a error, since the compiled function accepts only real values.  So I have to write a STUPID workaround  for manual typechecking:

integrand2 := proc (kF1, kF2, m, k, omega, q) if type(kF1, numeric) and type(q, numeric) and type(kF2, numeric) and type(omega, numeric) and type(m, numeric) and type(k, numeric) then integrand1(kF1, kF2, m, k, omega, q) else 'integrand1(kF1, kF2, m, k, omega, q)' end if end proc

How to do this in a normal way?

Please Wait...