Skip to content
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

NaNMath functions should fallback to the default method #66

Open
YingboMa opened this issue Aug 1, 2023 · 1 comment
Open

NaNMath functions should fallback to the default method #66

YingboMa opened this issue Aug 1, 2023 · 1 comment

Comments

@YingboMa
Copy link
Member

YingboMa commented Aug 1, 2023

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
@kapple19
Copy link

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.

@YingboMa YingboMa changed the title NaNMath functions show fallback to the default method NaNMath functions should fallback to the default method Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants