[issue45218] cmath.log has an invalid signature

2021-09-24 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue45218] cmath.log has an invalid signature

2021-09-16 Thread STINNER Victor
STINNER Victor added the comment: The current Argument Clinic syntax for math.log() is: -- /*[clinic input] math.log x:object [ base: object(c_default="NULL") = math.e ] / Return the logarithm of x to the given base. (...) -- math.log.__text_s

[issue45218] cmath.log has an invalid signature

2021-09-16 Thread Mark Dickinson
Mark Dickinson added the comment: > and `log` base `math.e` is likely to be less accurate than plain natural log Nope, that's nonsense, since the two-argument form simply divides by log(base), and while log(math.e) is mathematically not exactly 1 (its exact value, assuming IEEE 754 binary64,

[issue45218] cmath.log has an invalid signature

2021-09-16 Thread Mark Dickinson
Mark Dickinson added the comment: See also #36306 and #29299. There may be nothing to be done here, but it would be nice if math.log and cmath.log at least behaved in the same way. A default of `None` doesn't seem like a terrible option. (BTW, just to forestall the suggestion, a default of `

[issue45218] cmath.log has an invalid signature

2021-09-16 Thread Mark Dickinson
Mark Dickinson added the comment: Issue #43067 is similar. I'm not sure what the best solution is in this case: - un-argument-clinic cmath.log, and document the signature using two lines (similar to range): log(z) log(z, base) - change the behaviour of cmath.log so that the second

[issue45218] cmath.log has an invalid signature

2021-09-16 Thread Mark Dickinson
Change by Mark Dickinson : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue45218] cmath.log has an invalid signature

2021-09-16 Thread Mark Dickinson
New submission from Mark Dickinson : inspect.signature reports that the cmath.log function has an invalid signature: Python 3.11.0a0 (heads/fix-44954:d0ea569eb5, Aug 19 2021, 14:59:04) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin Type "help", "copyright", "credits" or "license" for more infor