[issue44357] Add math.cbrt() function: Cube Root

Mark Dickinson report at bugs.python.org
Wed Jun 9 05:02:57 EDT 2021


Mark Dickinson <dickinsm at gmail.com> added the comment:

BTW, to forestall questions about adding cmath.cbrt: it's not obvious how to extend the real cube root function to a complex cube root, so it might make sense to wait for actual use-cases before doing so.

The issue is that the most natural way to define a complex cube root would use a branch cut along the negative real axis (the same branch cut that cmath.sqrt and cmath.log use). But then the principal branch would *not* be an extension of math.cbrt: it would return non-real values on the negative real axis. (The *real* cube roots of negative numbers would fall on the two non-principal branches.)

See for example https://math.stackexchange.com/questions/71775/extending-the-cube-root-function-to-mathbbc

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44357>
_______________________________________


More information about the Python-bugs-list mailing list