-
-
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
error flag in bessel functions #4172
Comments
@simonp0420 How would we check the error flag from amos? |
@staticfloat I'm only familiar with calling the Amos routines from Fortran. One of the subroutine arguments is an integer return argument IERR. Nonzero values indicate an error condition, as defined in the leading comments to the Amos routines. I assumed that this argument's return value is available in Julia as part of the return from calling the Amos routine after it has been incorporated into the openlibm math library. Is this not the case? |
@staticfloat Having just read the material on ccall for the first time, and looking at the calls to the Amos routines in math.jl, it looks like it should be pretty simple. For example, here is the call to the double precision complex Bessel function of the first kind:
It looks like IERR is available in ae[2]. I would undertake making these changes myself, but I'm not competent at using Git and GitHub--I think it could take me a long time to get up to speed. Also, I'm probably not aware of the right way to flag errors in a Julian way. |
It's not so bad, and we're definitely willing to help and teach. Start at https://help.github.com/categories/54/articles, and maybe also see http://youtu.be/wnFYV3ZKtOg and https://gist.github.com/dmbates/2712118#file_julia_git_pull_request.md |
@pao Thanks for the encouragement! I will take a look at the resources you mentioned. But I don't want to step on @staticfloat 's toes if he would prefer to tackle this particular issue. Elliot, how do you feel about this? |
Be my guest! If you run into any problems just let me know, and I'll be glad to help! |
Thank you, sir! This will be my first foray into open source, Git, GitHub, etc. I'm sure I will need some help, but I am looking forward to the chance to give back in a small way. |
@staticfloat, @pao: OK, here are the first of many stupid questions to come...
Thanks, |
Hey Peter, good questions all:
|
Thanks, Elliot. I created Issue #4915 to address item 2. above, and pinged you. I'll work on setting up a pull request for item 3. |
@pao @staticfloat I'm having a problem with Git. On my local working machine I pulled the master branch from Julialang and then re-based my branch (amos_error_checking) on my local machine, apparently successfully. When I try to push this up to my GitHib repository, I am told that this is a non-fast-forward update. Reading about this wasn't helpful; I don't understand most of the explanations and the solution commonly suggested is to rebase, which I seem to have already successfully completed. See log of my Git session at https://gist.github.com/simonp0420/7672003 Sorry iif this is not the appropriate place to raise this question--if so, please redirect me. Thanks, |
Nope, this is a fine place to ask this. This is a pretty common confusion, and the solution is discussed here, on Stack Overflow. The short version is, you need to force your push, via Working on topic branches all but eliminates the danger, as the worst that should happen is you nuke any unshared history on your remote topic branch. However, some versions of If all this is making you a little nervous, don't worry too much. Because you're working on your own fork and not the main Julia repository you can't screw too much up. :) Also, you can use So, in summary, here's what you need to do to get this to work:
|
@staticfloat Thanks for the excellent guidance. I had read about -f but saw so many warnings about its dire consequences that I didn't want to try it without some assurance, which you kindly and expertly provided. I'm just about ready to issue the pull request. I've completed all the steps described at Contributing to core functionality or base libraries except for the Travis testing. I don't seem to be able to find any documentation on how to do that. Could I ask for some assistance here, one more time? Also, another in an endless series of dumb questions :-): I used a lot of small commits, including minor tweaks and re-writing of documentation, etc. Is this going to be annoying to the reviewers to wade through? Should I somehow compress all these commits into a single, big commit? Thanks, |
You can squash the commits. It would be great if you could also help improve the documentation in |
Yes, you can do this with the interactive feature of
This will open up text editor with 5 lines in it, each representing a commit:
By default, a
Note that you can use As far as Travis testing goes, don't worry about that just yet. This is something that could really help you if you are to make a lot of changes to Julia, but for your first pull request it's a bit of setup that you don't need to go through just yet. Travis is a continuous integration service that is free for opensource projects; it builds julia and runs our test suite every time we push a commit to the repository. You'd need to setup a notification (a "hook") that gets run every time you push to your own repository, which would allow you to know if your changes to julia broke something. When you make a pull request though, your code changes are automatically run through Travis because of how we have the JuliaLang repository setup, so your code will get tested regardless. Setting it up for yourself personally is more helpful when you are working on something large and want to get it working before opening up a PR. |
Hope this PR isn't a turkey! ;-) |
@staticfloat You spent a lot of time and effort in providing me with detailed guidance--I appreciate it very much. @ViralBShah I will be glad to take a look at adding to CONTRIBUTING.md assuming I get through this alive ;-). |
beselj0, besselj1, bessely0 and bessely1 should have methods that allow complex-valued arguments. Also, a new keyword option named, e.g., "ignore_error" defaulting to false should be provided for all Bessel function routines accepting complex arguments. If true, the option directs the routine to ignore the error flag returned by the Amos routines. The current implementation ignores the error flag in all cases.
See discussion at https://groups.google.com/forum/#!topic/julia-dev/Hy5u-2n5xVw
The text was updated successfully, but these errors were encountered: