bmad-sim / GTPSA.jl

Julia interface to the Generalised Truncated Power Series Algebra (GTPSA) library
https://bmad-sim.github.io/GTPSA.jl/
GNU General Public License v3.0
2 stars 0 forks source link

Special functions needed #80

Open DavidSagan opened 3 months ago

DavidSagan commented 3 months ago

Some special functions that will be needed:

PTC might have code for some of this.

mattsignorelli commented 3 months ago

We have sinc, though I had to add a constant factor of pi (sinc(x) = sin(x*pi)/x)) because that is what Julia base calculates. We also have complex erfc and erf so for the Fadeeva function I just need to add the scaling factor

DavidSagan commented 3 months ago

Julia defines sinc as the normalized version sing(x*pi)/(x*pi). I prefer the unnormalized version but oh well.

mattsignorelli commented 3 months ago

We could have the unnormalized version as "sa" for now https://en.wikipedia.org/wiki/Sinc_function I found on some forums / github issues that people want to change this but unfortunately it being a breaking change would have to wait until Julia 2.0

DavidSagan commented 3 months ago

How about sinc_u or sincu?