From 0a0b03353e345ef2ce1e10a2916207ebb0bf06d0 Mon Sep 17 00:00:00 2001 From: Nathan Sashihara <21227491+n8sh@users.noreply.github.com> Date: Fri, 5 Jun 2020 18:48:25 -0700 Subject: [PATCH 1/2] Fix documentation of std.math.isIdentical for NaN: compares all bits not just payload --- std/math.d | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/std/math.d b/std/math.d index 61dcd3c9f..a86f04424 100644 --- a/std/math.d +++ b/std/math.d @@ -6996,7 +6996,8 @@ if (isFloatingPoint!(X)) * Is the binary representation of x identical to y? * * Same as ==, except that positive and negative zero are not identical, - * and two $(NAN)s are identical if they have the same 'payload'. + * and two $(NAN)s are identical if they have the same 'payload', sign bit, + * and quiet bit. */ bool isIdentical(real x, real y) @trusted pure nothrow @nogc { From a7a1e0dc4ee690df24ea0b3eb4fe859186a6824d Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Sun, 7 Jun 2020 16:32:15 +0200 Subject: [PATCH 2/2] std.math: Fix comment for isIdentical --- std/math.d | 4 ---- 1 file changed, 4 deletions(-) diff --git a/std/math.d b/std/math.d index a86f04424..3d7d52851 100644 --- a/std/math.d +++ b/std/math.d @@ -6994,10 +6994,6 @@ if (isFloatingPoint!(X)) /********************************* * Is the binary representation of x identical to y? - * - * Same as ==, except that positive and negative zero are not identical, - * and two $(NAN)s are identical if they have the same 'payload', sign bit, - * and quiet bit. */ bool isIdentical(real x, real y) @trusted pure nothrow @nogc {