JuliaDiff / JuliaDiff/DualNumbers.jl
Consider renaming realpart to value or primalpart or similar
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 80
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
This package works a treat for evaluating the derivative functions at complex locations:
julia> using DualNumbers
julia> f(x) = (1, -2 *x) .* exp(-x^2) # value and derivative
f (generic function with 1 method)
julia> z = 1.0 + im # some complex location to evaluate the derivative
1.0 + 1.0im
julia> f(z)
(-0.4161468365471424 - 0.9092974268256817im, -0.9863011805570786 + 2.650888526745648im)
julia> realpart(f(Dual(z, 1))[1])
-0.4161468365471424 - 0.9092974268256817im
julia> dualpart(f(Dual(z, 1))[1])
-0.9863011805570786 + 2.650888526745648im
In this instance, realpart returns a complex value, which is a little misleading. @goretkin suggested in Slack that primalpart could be a better adjective. Any thoughts?
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 reviewing the package's realpart and dualpart APIs and searching for their uses in the repository. Compare the naming alternatives raised in the issue, then check the example to determine which name best describes the returned value. Done means the project has a decided, consistently applied name with working examples and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- developer-experience
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100