diff options
author | Ajith Ramachandran <ajithar204@gmail.com> | 2021-06-10 16:42:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-10 16:42:09 (GMT) |
commit | ac867f10b49322e25f34d2d8abd8e63c86834750 (patch) | |
tree | df19019a4f94682e5ed4303fe1328526c831517d /Modules | |
parent | 90cd4330329a99e52f7141db5e0a469d30088e66 (diff) | |
download | cpython-ac867f10b49322e25f34d2d8abd8e63c86834750.zip cpython-ac867f10b49322e25f34d2d8abd8e63c86834750.tar.gz cpython-ac867f10b49322e25f34d2d8abd8e63c86834750.tar.bz2 |
bpo-44357:Add `math.cbrt()` function: Cube Root (GH-26622)
* Add math.cbrt() function: Cube Root
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/mathmodule.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index a2a2db2..b3429c5 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -1182,6 +1182,9 @@ FUNC2(atan2, m_atan2, FUNC1(atanh, m_atanh, 0, "atanh($module, x, /)\n--\n\n" "Return the inverse hyperbolic tangent of x.") +FUNC1(cbrt, cbrt, 0, + "cbrt($module, x, /)\n--\n\n" + "Return the cube root of x.") /*[clinic input] math.ceil @@ -3550,6 +3553,7 @@ static PyMethodDef math_methods[] = { {"atan", math_atan, METH_O, math_atan_doc}, {"atan2", (PyCFunction)(void(*)(void))math_atan2, METH_FASTCALL, math_atan2_doc}, {"atanh", math_atanh, METH_O, math_atanh_doc}, + {"cbrt", math_cbrt, METH_O, math_cbrt_doc}, MATH_CEIL_METHODDEF {"copysign", (PyCFunction)(void(*)(void))math_copysign, METH_FASTCALL, math_copysign_doc}, {"cos", math_cos, METH_O, math_cos_doc}, |