Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions std/math/operations.d
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,13 @@ real NaN(ulong payload) @trusted pure nothrow @nogc
* For 80-bit or 128-bit reals, it is 0x3FFF_FFFF_FFFF_FFFF.
*/
ulong getNaNPayload(real x) @trusted pure nothrow @nogc
in
{
// Precondition: Input must be NaN
import std.math.traits : isNaN;
assert(isNaN(x), "getNaNPayload called on a non-NaN value");
}
do
{
import std.math.traits : floatTraits, RealFormat;

Expand Down
Loading