FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-89381: Fix signature for math.log and cmath.log by hauntsaninja · Pull Request #101115 · python/cpython · GitHub

Repository navigation

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (2) .h  (2) .rst  (1) All 3 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix signature for :func:`math.log` and :func:`cmath.log`.
6 changes: 3 additions & 3 deletions Modules/clinic/cmathmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 16 additions & 23 deletions Modules/clinic/mathmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Modules/cmathmodule.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -952,17 +952,17 @@ cmath_tanh_impl(PyObject *module, Py_complex z)
cmath.log

z as x: Py_complex
base as y_obj: object = NULL
base as y_obj: object(c_default="NULL") = cmath.e
/

log(z[, base]) -> the logarithm of z to the given base.
Return the logarithm of z to the given base.

If the base not specified, returns the natural logarithm (base e) of z.
[clinic start generated code]*/

static PyObject *
cmath_log_impl(PyObject *module, Py_complex x, PyObject *y_obj)
/*[clinic end generated code: output=4effdb7d258e0d94 input=230ed3a71ecd000a]*/
/*[clinic end generated code: output=4effdb7d258e0d94 input=6783d68473d21cf3]*/
{
Py_complex y;

Expand Down
7 changes: 2 additions & 5 deletions Modules/mathmodule.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2366,9 +2366,7 @@ loghelper(PyObject* arg, double (*func)(double))
math.log

x: object
[
base: object(c_default="NULL") = math.e
]
/

Return the logarithm of x to the given base.
Expand All @@ -2377,9 +2375,8 @@ If the base not specified, returns the natural logarithm (base e) of x.
[clinic start generated code]*/

static PyObject *
math_log_impl(PyObject *module, PyObject *x, int group_right_1,
PyObject *base)
/*[clinic end generated code: output=7b5a39e526b73fc9 input=0f62d5726cbfebbd]*/
math_log_impl(PyObject *module, PyObject *x, PyObject *base)
/*[clinic end generated code: output=1dead263cbb1e854 input=59b97db7030bb40b]*/
{
PyObject *num, *den;
PyObject *ans;
Expand Down

Back | FazBrowse Home | New Git URL