-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
gh-137871: Clarify cmath.nan documentation by linking to math module #137876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -340,6 +340,8 @@ Constants | |||||||||||
A floating-point "not a number" (NaN) value. Equivalent to | ||||||||||||
``float('nan')``. | ||||||||||||
|
||||||||||||
See also :data:`math.nan`. | ||||||||||||
|
||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cmath.nan is more equivalent to math.nan than float('nan') in being a fixed data object, with a fixed id, rather than a function which can return different objects with different ids when called multiple times.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think it's better. Link just show you same statement of "equivalency". Better just inline it here. In all respect it's "an equivalency", i.e. all nan's in Python are same in sense that we don't have separated signaling/quiet nans and they don't have payload. (Or, in some sense, we don't have simple user interface to this stuff.) (BTW, I think you suggestion is off by one whitespace.) |
||||||||||||
.. versionadded:: 3.6 | ||||||||||||
|
||||||||||||
|
||||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.