Skip to content

Commit 16dc6e2

Browse files
committed
Docs: Clarify cmath.nan/inf by linking to math module
The documentation for `cmath.nan` and `cmath.inf` is updated to cross-reference the equivalent constants in the `math` module. The `math` module's documentation contains a more thorough explanation of the properties of these special floating-point values, as required by the IEEE 754 standard (e.g., that NaN does not compare equal to itself).
1 parent 7636a66 commit 16dc6e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/cmath.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ Constants
322322

323323
.. data:: inf
324324

325-
Floating-point positive infinity. Equivalent to ``float('inf')``.
325+
Floating-point positive infinity. Equivalent to :data:`math.inf`.
326326

327327
.. versionadded:: 3.6
328328

@@ -338,7 +338,7 @@ Constants
338338
.. data:: nan
339339

340340
A floating-point "not a number" (NaN) value. Equivalent to
341-
``float('nan')``.
341+
:data:`math.nan`.
342342

343343
.. versionadded:: 3.6
344344

0 commit comments

Comments
 (0)