Fix bug in catand (complex arc tangent)
Function catand returned an incorrect value for its real part. To be possibly replaced with the intrinsic function atan.
This commit is contained in:
parent
8c3e246f25
commit
3eab989d7b
@ -74,7 +74,7 @@ contains
|
||||
print*,'catand, answer lt half precision, z**2 close to -1'
|
||||
!
|
||||
end if
|
||||
xans = 0.5_wp_*atan2(2.0_wp_*x, one)
|
||||
xans = 0.5_wp_*atan2(2.0_wp_*x, one-r2)
|
||||
yans = 0.25_wp_*log((r2+2.0_wp_*y+one)/(r2-2.0_wp_*y+one))
|
||||
catand = cmplx(xans, yans, wp_)
|
||||
!
|
||||
|
Loading…
Reference in New Issue
Block a user