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

Fix incorrect sign of atanh(complex(x,y)) if x == -1 #31061

Merged
merged 10 commits into from
Feb 19, 2019
2 changes: 1 addition & 1 deletion base/complex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ function atanh(z::Complex{T}) where T<:AbstractFloat
η = zero(y)
else
ym = ay+ρ
ξ = log(sqrt(sqrt(4+y*y))/sqrt(ym))
ξ = copysign(log(sqrt(sqrt(4+y*y))/sqrt(ym)),x)
cafaxo marked this conversation as resolved.
Show resolved Hide resolved
η = copysign(oftype(y,pi)/2 + atan(ym/2), y)/2
end
else #Normal case
Expand Down