JuliaDiff / JuliaDiff/ForwardDiff.jl
`Irrational` values don't work as input to API functions
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 1k
- Forks
- 160
- PR merge metrics
- No merged PRs in 30d
Description
This seems like a small detail to fix up:
derivative(sin)(pi)
ERROR: MethodError: `convert` has no method matching convert(::Type{Irrational{:π}}, ::Int64)
This may have arisen from a call to the constructor Irrational{:π}(...),
since type constructors fall back to convert methods.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing derivative(sin)(pi) and trace how the API handles Irrational inputs, focusing on the conversion error shown in the issue. Done means the expression accepts pi without the reported MethodError and regression coverage verifies the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100