-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
add complex error functions (via http://ab-initio.mit.edu/Faddeeva) #1799
Conversation
I just updated the openlibm submodule on master. Merge master into this branch and commit - that should fix the travis build. Could you also add a couple of tests to |
Done. Pull from stevengj@ac7c520 (Not sure how to modify the existing pull request on github.) |
Just keep committing to the same branch, and it will keep showing up in this pull request. |
Your commits are showing up fine. I think you need to Faddeeva-wrapper to STAGE2_DEPS in |
Done. (I could have sworn I already did that, but maybe I forgot to save...) |
Same error. @staticfloat Are you able to tell why the Faddeeva wrapper is not getting installed in the right place? |
Could you be more precise about the problem you are seeing? If I do 'make' and run ./julia the new functions work just fine for me. I also tried git cloning a fresh repo from mine and re-running make from scratch, and it still works. |
I think @ViralBShah was referring to the failure in the CI test, here: https://travis-ci.org/JuliaLang/julia/jobs/3768385/#L1039 |
Ok, this looks like it works. The clang build failure was due to a failure setting up the build environment, but the gcc build went through fine. |
add complex error functions (via http://ab-initio.mit.edu/Faddeeva)
This patch adds support for error functions erf and erfc of arbitrary complex arguments, as well as the related functions erfi, erfcx, and dawson. (It requires the most recent version of openlibm with the Faddeeva package merged.)
Note that the ugliness with the libFaddeeva_wrapper library can go away once ccall supports C99 complex numbers (issue #85).
The code works, but a little tweak from a Julia expert would be useful. In
I declared w as a local variable to hold the return value. I tried declaring
in the surrounding let block instead, similar to how the Bessel and Airy functions are handled, but for some reason this led to Julia complaining that w was not defined inside the function. I'm guessing that it is some kind of macro hygiene problem, but using $(esc(w)) did not seem to work.