Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Special functions needed #80

Open
7 tasks
DavidSagan opened this issue Feb 8, 2024 · 4 comments
Open
7 tasks

Special functions needed #80

DavidSagan opened this issue Feb 8, 2024 · 4 comments

Comments

@DavidSagan
Copy link
Member

DavidSagan commented Feb 8, 2024

Some special functions that will be needed:

  • cos_one = cos(x) - 1
  • cosc = (1 - cos(x)) / x^2
  • sqrt_one = sqrt(1+x) - 1 # Helpful identity: = x / (sqrt(1+x) + 1)
  • complex error function (Faddeeva function)
  • bessel functions of all sorts.
  • elliptic integrals # sim_utils/special_functions/elliptic_integral_mod.f90 has code for this.
  • generalized complete elliptic integral # See sim_utils/special_functions/gen_complete_elliptic.f90

PTC might have code for some of this.

@mattsignorelli
Copy link
Contributor

mattsignorelli commented Feb 8, 2024

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
Copy link
Member Author

DavidSagan commented Feb 19, 2024

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

@mattsignorelli
Copy link
Contributor

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
Copy link
Member Author

How about sinc_u or sincu?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants