Issue #12345: Add mathemathcal constant tau to math and cmath.

Patch by Lisa Roach. See also PEP 628.
This commit is contained in:
Guido van Rossum 2016-08-15 09:12:52 -07:00
parent 6349612a8e
commit 0a891d70de
7 changed files with 23 additions and 2 deletions

View file

@ -55,6 +55,12 @@ extern double pow(double, double);
#define Py_MATH_E 2.7182818284590452354
#endif
/* Tau (2pi) to 40 digits, taken from tauday.com/tau-digits. */
#ifndef Py_MATH_TAU
#define Py_MATH_TAU 6.2831853071795864769252867665590057683943L
#endif
/* On x86, Py_FORCE_DOUBLE forces a floating-point number out of an x87 FPU
register and into a 64-bit memory location, rounding from extended
precision to double precision in the process. On other platforms it does