diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-06-30 00:54:03 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-06-30 00:54:03 -0700 |
| commit | c8531faaf56612773ef860d341f8eebb36af4bf3 (patch) | |
| tree | b966d3a249d388be2f0591c4fef98d1e67071c33 /src/codegen | |
| parent | 6bc6e47b1582a4538078c8f4e9b3dae386854d07 (diff) | |
| download | zig-c8531faaf56612773ef860d341f8eebb36af4bf3.tar.gz zig-c8531faaf56612773ef860d341f8eebb36af4bf3.zip | |
stage2: hash/eql of fixed-size floats use bit pattern
Zig guarantees the memory layout of f16, f32, f64, f80, and f128 which
means for generic function purposes, values of these types need to be
compared on the basis of their bits in memory. This means nan-packing
can be used with generic functions, for example.
For comptime_float, the sign is observable, whether it is nan is
observable, but not any more kinds of bit patterns are observable.
This fixes the std.fmt tests that check printing "-nan".
Diffstat (limited to 'src/codegen')
0 files changed, 0 insertions, 0 deletions
