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

Implement complex for dual arguments #90

Merged
merged 4 commits into from
Mar 6, 2022
Merged

Implement complex for dual arguments #90

merged 4 commits into from
Mar 6, 2022

Conversation

sethaxen
Copy link
Member

@sethaxen sethaxen commented Mar 5, 2022

This PR implements the following methods:

  • complex(::Dual, ::Real) -> Dual{<:Complex}
  • complex(::Real, ::Dual) -> Dual{<:Complex}
  • complex(::Dual, ::Dual) -> Dual{<:Complex}
  • complex(::Type{Dual{T}})

This allows Dual to be used for automatically differentiating not just the complex functions for which rules are defined here but also the construction of those complex numbers.

@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2022

Codecov Report

Merging #90 (f5a6d29) into master (7848bf4) will increase coverage by 1.36%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #90      +/-   ##
==========================================
+ Coverage   44.67%   46.03%   +1.36%     
==========================================
  Files           1        1              
  Lines         197      202       +5     
==========================================
+ Hits           88       93       +5     
  Misses        109      109              
Impacted Files Coverage Δ
src/dual.jl 46.03% <100.00%> (+1.36%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7848bf4...f5a6d29. Read the comment docs.

@dlfivefifty dlfivefifty merged commit 1036d45 into master Mar 6, 2022
@dlfivefifty
Copy link
Collaborator

Looks fine

This pull request was closed.
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

Successfully merging this pull request may close these issues.

3 participants