-
-
Notifications
You must be signed in to change notification settings - Fork 747
Open
Description
std.math.getNaNPayload(x) quietly accepts any real number and extracts the bits that would hold a payload as if the argument where NaN. For example, getNaNPayload(7) returns 2097152 for 80-bit real.
I'm asking if the ddoc getNaNPayload function comment could be updated to mention that it is up to the caller to verify that the argument being passed to getNaNPayload is a NaN, otherwise the result will be nonsensical.
It would also be nice if a precondition contract could be added to verify that the input parameter is a NaN.
Tushar-sketch-bit
Metadata
Metadata
Assignees
Labels
No labels