JuliaLang/julia — pull request #4967 by simonp0420 (2013-11-28 18:03:29+00:00)
Title: WIP: Add error checking to Amos package-based Airy and Bessel methods. Correct # arguments in ccall to :zbiry.

Completes changes proposed in issue #4172 and addresses issue #4195.

RFC: As currently implemented, the new optional arguments are accepted only by methods that call
Amos routines. So, e.g., a call like `besselj0(1+0im, ignore_errors=false)` works fine, but
`besselj0(1, ignore_errors=false)` will result in a Julia error:

ERROR: no method besselj0(Array{Any,1}, Int64)

We could instead choose to allow the optional arguments to be accepted in all calls to Bessel
functions, but for Bessel functions of the first and second kind of integer order called
with real arguments they would not have any effect.

Another option is to completely eliminate the optional arguments and simply take the current default
behavior in all cases.