Mark Dickinson <dicki...@gmail.com> added the comment:
Yes, that looks like the right part of the sqrt code. For the acos docstring, "continuous from below" implies that for any complex number z that lies exactly _on_ the branch cut, acos(z) is close to acos(w) for a nearby value w just _below_ the branch cut. But that's demonstrably not true: see the change of sign in the real part below: >>> acos(complex(2.3, -1e-10)) # value just "below" the branch cut (4.828045495852677e-11+1.475044781241425j) >>> acos(complex(2.3, 0.0)) # nearby value exactly _on_ the branch cut -1.475044781241425j In effect, for a branch cut along the real axis, the sign of the zero in the imaginary part of the argument allows us to be continuous from both sides at once. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41245> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com