-
Notifications
You must be signed in to change notification settings - Fork 25
Description
First Kudos to D.E. Amos, and Dumont and McNogginson for making the original Fortran code and supplying a wrapper for c+. Since c / c++ is the only code I know at a moderately advanced level, your work has been of great benefit to me and I hope many others. I did need to translate the Amos code given in the github link into c / c++ as I spent a lot of time trying to get the wrapper to work using Visual Studio Community 2022 (64-bit) Version 19.9.6 but was not able to do so as my understanding of doing so is rather limited.
After completing all subroutines (now functions completely called by reference) required for Bessel Functions of the 1st kind, as well as the partially redundant Hanke1 and 2 functions, I tested the c code (both the translated Fortran as well as the original Fortran. They seem to work almost alright, but I I am having a problem when the argument to these functions is a pure real number. In this case, the return value for bessj() always contains an imaginary component (for example argument 1.328, with fnu = 1 and N = 100). This is a disappointment for me because I have been looking for a robust manner to calculate complex Bessel Functions for some time in order to design laser light scattering program that will work with absorbing particles in order to design and interpret phase Doppler Anamometry experiments for particle sizing. Can anyone offer me an explanation for the behavior I am observing as well as a way around the problem. Thanks again.