Commit 7d6d1d1f60

Shawn Landden <shawn@git.icu>
2018-09-01 13:08:13
NaNs do not have signedness.
From IEEE-754 standard: Conversion of a quiet NaN in a supported format to an external character sequence shall produce a language-defined one of “nan” or a sequence that is equivalent except for case (e.g., “NaN”), with an optional preceding sign. (This standard does not interpret the sign of a NaN.)
1 parent fdeb876
Changed files (1)
std
std/fmt/index.zig
@@ -1034,11 +1034,6 @@ test "fmt.format" {
         const result = try bufPrint(buf1[0..], "f64: {}\n", math.nan_f64);
         assert(mem.eql(u8, result, "f64: nan\n"));
     }
-    {
-        var buf1: [32]u8 = undefined;
-        const result = try bufPrint(buf1[0..], "f64: {}\n", -math.nan_f64);
-        assert(mem.eql(u8, result, "f64: -nan\n"));
-    }
     {
         var buf1: [32]u8 = undefined;
         const result = try bufPrint(buf1[0..], "f64: {}\n", math.inf_f64);