Alternatively, you could just redefine sin without the nan_dom_err call: https://github.com/JuliaLang/julia/blob/cdcdc7ae5a79d5f8232a14e6e072123dd178cf9e/base/math.jl#L123
Something like the following should work: import Base.sin sin(x::Float64) = ccall((:sin,Base.Math.libm), Float64, (Float64,), x) On Wednesday, 5 November 2014 13:08:59 UTC, [email protected] wrote: > > In order to avoid exiting the program, I am checking for Inf and setting > the result to Nan manually for each trigonometric function. I agree with > John's comments and hope that something like this would become default > behavior. > @Milan: Thanks for the link, it was a good one. >
