Skip to content

Commit

Permalink
fix sqrt(::Directed) (needs some thought though)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty committed Aug 26, 2017
1 parent 12a498c commit 1e4cc41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SingularIntegralEquations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ end
Base.log(x::Directed{true}) = log(-x.x) - π*im
Base.log(x::Directed{false}) = log(-x.x) + π*im
Base.log1p(x::Directed) = log(1+x)
Base.sqrt(x::Directed{true}) = x.x 0 ? sqrt(complex(x.x)) : -im*sqrt(-x.x)
Base.sqrt(x::Directed{false}) = x.x 0 ? sqrt(complex(x.x)) : im*sqrt(-x.x)
Base.sqrt(x::Directed{true}) = real(x.x) 0 ? sqrt(complex(x.x)) : -im*sqrt(-x.x)
Base.sqrt(x::Directed{false}) = real(x.x) 0 ? sqrt(complex(x.x)) : im*sqrt(-x.x)
^(x::Directed{true},a::Integer) = x.x^a
^(x::Directed{false},a::Integer) = x.x^a
^(x::Directed{true},a::Number) = exp(-a*π*im)*(-x.x)^a
Expand Down

0 comments on commit 1e4cc41

Please sign in to comment.