NaNMath.jl
NaNMath.jl copied to clipboard
NaNMath functions should fallback to the default method
julia> asin(1+1im)
0.6662394324925153 + 1.0612750619050357im
julia> using NaNMath
julia> NaNMath.asin(1+1im)
ERROR: MethodError: no method matching asin(::Complex{Int64})
You may have intended to import Base.asin
Closest candidates are:
asin(::DualNumbers.Dual)
@ DualNumbers ~/.julia/packages/DualNumbers/5knFX/src/dual.jl:327
asin(::PolyForm{<:Number})
@ SymbolicUtils ~/src/julia/SymbolicUtils/src/methods.jl:87
asin(::SymbolicUtils.BasicSymbolic{<:Number})
@ SymbolicUtils ~/src/julia/SymbolicUtils/src/methods.jl:87
...
Stacktrace:
[1] top-level scope
@ REPL[7]:1
IntervalArithmetic would benefit from this too. I was just about to submit a pull request for a NaNMath extension in IntervalArithmetic, then realised it would be more effective if NaNMath fellback to Base functions for other numeric types inputted. Is there any work on this? I'm happy to pick this up.