[issue41245] cmath module documentation is misleading on branch cuts

2020-07-08 Thread Mark Dickinson
Mark Dickinson added the comment: > [...] see the change of sign in the real part below [...] Grr. Stupid fingers. That should say "imaginary part", not "real part" -- ___ Python tracker ___

[issue41245] cmath module documentation is misleading on branch cuts

2020-07-08 Thread Mark Dickinson
Mark Dickinson 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. B

[issue41245] cmath module documentation is misleading on branch cuts

2020-07-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for changing the language to match the actual mechanics. > "the sign of the imaginary part of x is used [...]" I'm trying to see where this happens. Is this part of cmath_sqrt? if (z.real >= 0.) { r.real = s; r.imag = copysign(d,

[issue41245] cmath module documentation is misleading on branch cuts

2020-07-08 Thread Mark Dickinson
Change by Mark Dickinson : -- assignee: -> docs@python components: +Documentation nosy: +docs@python versions: +Python 3.10, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker

[issue41245] cmath module documentation is misleading on branch cuts

2020-07-08 Thread Mark Dickinson
Mark Dickinson added the comment: > the sign of x is used [...] Correction: That should say "the sign of the imaginary part of x is used [...]" -- ___ Python tracker ___

[issue41245] cmath module documentation is misleading on branch cuts

2020-07-08 Thread Mark Dickinson
New submission from Mark Dickinson : The documentation for the cmath module is misleading on the behaviour near branch cuts. For example, the documentation for cmath.acos says: Return the arc cosine of x. There are two branch cuts: One extends right from 1 along the real axis to ∞, contin