mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
Issue #12345: Add mathemathcal constant tau to math and cmath.
Patch by Lisa Roach. See also PEP 628.
This commit is contained in:
parent
6349612a8e
commit
0a891d70de
7 changed files with 23 additions and 2 deletions
|
@ -2144,6 +2144,7 @@ PyInit_math(void)
|
|||
|
||||
PyModule_AddObject(m, "pi", PyFloat_FromDouble(Py_MATH_PI));
|
||||
PyModule_AddObject(m, "e", PyFloat_FromDouble(Py_MATH_E));
|
||||
PyModule_AddObject(m, "tau", PyFloat_FromDouble(Py_MATH_TAU)); /* 2pi */
|
||||
PyModule_AddObject(m, "inf", PyFloat_FromDouble(m_inf()));
|
||||
#if !defined(PY_NO_SHORT_FLOAT_REPR) || defined(Py_NAN)
|
||||
PyModule_AddObject(m, "nan", PyFloat_FromDouble(m_nan()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue