Message373329
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. |
|
Date |
User |
Action |
Args |
2020-07-08 18:51:22 | mark.dickinson | set | recipients:
+ mark.dickinson, rhettinger, docs@python |
2020-07-08 18:51:22 | mark.dickinson | set | messageid: <1594234282.87.0.273102613267.issue41245@roundup.psfhosted.org> |
2020-07-08 18:51:22 | mark.dickinson | link | issue41245 messages |
2020-07-08 18:51:22 | mark.dickinson | create | |
|