From 7854012077009b9f364f198a8ae38b546ec58313 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 10 Mar 2022 17:47:18 +0100 Subject: bpo-46917: math.nan is now always available (GH-31793) --- Doc/library/math.rst | 3 +++ Doc/whatsnew/3.11.rst | 4 ++++ Misc/NEWS.d/next/Library/2022-03-10-14-47-16.bpo-46917.s19zcy.rst | 1 + 3 files changed, 8 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2022-03-10-14-47-16.bpo-46917.s19zcy.rst diff --git a/Doc/library/math.rst b/Doc/library/math.rst index 1ad6045..bcbcdef 100644 --- a/Doc/library/math.rst +++ b/Doc/library/math.rst @@ -649,6 +649,9 @@ Constants A floating-point "not a number" (NaN) value. Equivalent to the output of ``float('nan')``. + .. versionchanged:: 3.11 + It is now always available. + .. versionadded:: 3.5 diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 0e3ccb6..ce15fb7 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -254,6 +254,7 @@ inspect math ---- + * Add :func:`math.exp2`: return 2 raised to the power of x. (Contributed by Gideon Mitchell in :issue:`45917`.) @@ -266,6 +267,9 @@ math ``inf``. Previously they raised :exc:`ValueError`. (Contributed by Mark Dickinson in :issue:`44339`.) +* The :data:`math.nan` value is now always available. + (Contributed by Victor Stinner in :issue:`46917`.) + operator -------- diff --git a/Misc/NEWS.d/next/Library/2022-03-10-14-47-16.bpo-46917.s19zcy.rst b/Misc/NEWS.d/next/Library/2022-03-10-14-47-16.bpo-46917.s19zcy.rst new file mode 100644 index 0000000..3fbd84a --- /dev/null +++ b/Misc/NEWS.d/next/Library/2022-03-10-14-47-16.bpo-46917.s19zcy.rst @@ -0,0 +1 @@ +The :data:`math.nan` value is now always available. Patch by Victor Stinner. -- cgit v0.12