Skip to content

Commit

Permalink
Update complex.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreySarnoff committed Mar 14, 2019
1 parent 7e351ec commit e0a9ca8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/math/elementary/complex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,19 @@ function acosh(x::Complex{DoubleFloat{T}}) where {T<:IEEEFloat}
return Complex{DoubleFloat{T}}(t17, t19)
end

#=
Julia(evalc(Re(arctanh(r+i*sqrt(-1)))), optimize = true);
t2 = (r + 1) ^ 2
t3 = i ^ 2
t6 = (r - 1) ^ 2
t10 = log(1 / (t6 + t3) * (t2 + t3))
t11 = t10 / 4
Julia(evalc(Im(arctanh(r+i*sqrt(-1)))), optimize = true);
t2 = atan2(i, r + 1)
t4 = atan2(-i, 1 - r)
t6 = t2 / 2 - t4 / 2
=#

function atanh(x::Complex{DoubleFloat{T}}) where {T<:IEEEFloat}
rea, ima = reim(x)
ima2 = square(ima)
Expand Down

0 comments on commit e0a9ca8

Please sign in to comment.