authorgravatar for shawn@git.icuShawn Landden <shawn@git.icu> 2018-09-01 11:08:13+00:00
committergravatar for shawn@git.icuShawn Landden <shawn@git.icu> 2018-09-08 03:52:28+00:00
log7d6d1d1f607629625413d62c51b0c9f4c81cefe5
tree2acbf60fd6624d460d5f6c454a6562a5ebd255c3
parentfdeb8765f0dd0d147371b22a28b442c6f19fa36d

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 files changed, 0 insertions(+), 5 deletions(-)

std/fmt/index.zig-5
...@@ -1034,11 +1034,6 @@ test "fmt.format" {...@@ -1034,11 +1034,6 @@ test "fmt.format" {
1034 const result = try bufPrint(buf1[0..], "f64: {}\n", math.nan_f64);1034 const result = try bufPrint(buf1[0..], "f64: {}\n", math.nan_f64);
1035 assert(mem.eql(u8, result, "f64: nan\n"));1035 assert(mem.eql(u8, result, "f64: nan\n"));
1036 }1036 }
1037 {
1038 var buf1: [32]u8 = undefined;
1039 const result = try bufPrint(buf1[0..], "f64: {}\n", -math.nan_f64);
1040 assert(mem.eql(u8, result, "f64: -nan\n"));
1041 }
1042 {1037 {
1043 var buf1: [32]u8 = undefined;1038 var buf1: [32]u8 = undefined;
1044 const result = try bufPrint(buf1[0..], "f64: {}\n", math.inf_f64);1039 const result = try bufPrint(buf1[0..], "f64: {}\n", math.inf_f64);