From 7ca34db12bf3f6b10e90aac82414a6d384f05a79 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Wed, 12 Nov 2025 18:03:55 +0100 Subject: [PATCH] [3.13] gh-141004: Document `Py_MATH_{E, PI, TAU}` constants (GH-141373) (#141472) gh-141004: Document `Py_MATH_{E, PI, TAU}` constants (GH-141373) (cherry picked from commit f1330b35b8eb43904dfed0656acde80c08d63176) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> --- Doc/c-api/float.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Doc/c-api/float.rst b/Doc/c-api/float.rst index 1a3857277b94..ad63359bf9b1 100644 --- a/Doc/c-api/float.rst +++ b/Doc/c-api/float.rst @@ -96,16 +96,33 @@ Floating-Point Objects the C11 standard ```` header. +.. c:macro:: Py_MATH_E + + The definition (accurate for a :c:expr:`double` type) of the :data:`math.e` constant. + + .. c:macro:: Py_MATH_El High precision (long double) definition of :data:`~math.e` constant. +.. c:macro:: Py_MATH_PI + + The definition (accurate for a :c:expr:`double` type) of the :data:`math.pi` constant. + + .. c:macro:: Py_MATH_PIl High precision (long double) definition of :data:`~math.pi` constant. +.. c:macro:: Py_MATH_TAU + + The definition (accurate for a :c:expr:`double` type) of the :data:`math.tau` constant. + + .. versionadded:: 3.6 + + .. c:macro:: Py_RETURN_NAN Return :data:`math.nan` from a function. -- 2.47.3