authorgravatar for hi@viri.moevi <hi@viri.moe> 2022-04-12 23:58:04-06:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-04-14 02:55:46-04:00
log6ad9ac59e7461fa6bd906f7c4feb662509082c17
treef8169d473a9191a9f38ae6e4ea9dea09e7b73c2b
parent497f8a60986eac6c5abd3230b34b975bd1701c53

std.math.float: fix f80-backed c_longdouble consts


1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/math/float.zig+1-1
......@@ -4,7 +4,7 @@ const expect = std.testing.expect;
44
55/// Creates a raw "1.0" mantissa for floating point type T. Used to dedupe f80 logic.
66fn mantissaOne(comptime T: type) comptime_int {
7 return if (T == f80) 1 << floatFractionalBits(T) else 0;
7 return if (@typeInfo(T).Float.bits == 80) 1 << floatFractionalBits(T) else 0;
88}
99
1010/// Creates floating point type T from an unbiased exponent and raw mantissa.