diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-10-06 00:11:39 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-06 00:11:39 -0400 |
| commit | d40c4e7c896c5dfed9dd35e8c0d2117f7cf5c53c (patch) | |
| tree | 07f7204287159ca5c9926e797144ef91ab35cdb6 /std/fmt/index.zig | |
| parent | 5b84192f07d5e4b3f5ebcd3e08d79852710c04f4 (diff) | |
| parent | 2d2734172484871eb56705e77acca50a8c83d8ae (diff) | |
| download | zig-d40c4e7c896c5dfed9dd35e8c0d2117f7cf5c53c.tar.gz zig-d40c4e7c896c5dfed9dd35e8c0d2117f7cf5c53c.zip | |
Merge pull request #1429 from shawnl/arm64
initial arm64 support
Diffstat (limited to 'std/fmt/index.zig')
| -rw-r--r-- | std/fmt/index.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/std/fmt/index.zig b/std/fmt/index.zig index b91699da43..8b6117e8c5 100644 --- a/std/fmt/index.zig +++ b/std/fmt/index.zig @@ -1044,7 +1044,9 @@ test "fmt.format" { const result = try bufPrint(buf1[0..], "f64: {}\n", math.nan_f64); assert(mem.eql(u8, result, "f64: nan\n")); } - { + if (builtin.arch != builtin.Arch.armv8) { + // negative nan is not defined by IEE 754, + // and ARM thus normalizes it to positive nan var buf1: [32]u8 = undefined; const result = try bufPrint(buf1[0..], "f64: {}\n", -math.nan_f64); assert(mem.eql(u8, result, "f64: -nan\n")); |
