|
From: | Rik |
Subject: | Re: About special functions reogranization |
Date: | Fri, 14 Jul 2017 12:04:01 -0700 |
On 07/13/2017 09:00 AM,
address@hidden wrote:
Michele, I read your summary of the state of the bessel, gammainc, and betainc functions with interest. For the Bessel functions, you state that Matlab allows a complex alpha parameter, but this is not the case (http://www.mathworks.com/help/matlab/ref/besselj.html). This doesn't detract much from your argument. The real issue which prevents using the GSL library is that the input itself must be real, while AMOS and Matlab both support a complex input Z. For gammainc, you assert that there is no "scaled" option. But, there is an unnormalized version of the function gsl_sf_gamma_inc. It wouldn't be too difficult to transform the unnormalized output to the scaled output defined by Matlab. It does involve multiplication by a scaling factor, but underflow potential, which is what the scaled option in Matlab is seeking to prevent, looks much more unlikely in this case. However, you're still probably right to create your own implementation given that the GSL library requires X to be positive for all versions of the function. The current implementation of gammainc is in Fortran. Will you be writing in Fortran, C++, or Octave? I doubt you can get the performance out of an Octave m-file that you can out of the other two compiled languages, unless there are very few iterative loops in the algorithm. I agree with your conclusion that betainc is insufficient. You mention writing an m-file to replace what is now Fortran code. Again, my concern here is that the performance will not be high enough unless the algorithm does not use iterative loops. Happy coding, Rik |
[Prev in Thread] | Current Thread | [Next in Thread] |