mirror of
https://github.com/ziglang/zig.git
synced 2026-02-15 05:48:31 +00:00
std.math.float: fix f80-backed c_longdouble consts
This commit is contained in:
parent
497f8a6098
commit
6ad9ac59e7
@ -4,7 +4,7 @@ const expect = std.testing.expect;
|
||||
|
||||
/// Creates a raw "1.0" mantissa for floating point type T. Used to dedupe f80 logic.
|
||||
fn mantissaOne(comptime T: type) comptime_int {
|
||||
return if (T == f80) 1 << floatFractionalBits(T) else 0;
|
||||
return if (@typeInfo(T).Float.bits == 80) 1 << floatFractionalBits(T) else 0;
|
||||
}
|
||||
|
||||
/// Creates floating point type T from an unbiased exponent and raw mantissa.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user