aboutsummaryrefslogtreecommitdiff
path: root/lib/std/packed_int_array.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-06-30 00:54:03 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-06-30 00:54:03 -0700
commitc8531faaf56612773ef860d341f8eebb36af4bf3 (patch)
treeb966d3a249d388be2f0591c4fef98d1e67071c33 /lib/std/packed_int_array.zig
parent6bc6e47b1582a4538078c8f4e9b3dae386854d07 (diff)
downloadzig-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 'lib/std/packed_int_array.zig')
0 files changed, 0 insertions, 0 deletions