pub inline fn floatExponentBits(comptime T: type) comptime_int T: type175
176
177
178
179
180
181
182
183
184
185
186pub inline fn floatExponentBits(comptime T: type) comptime_int {
comptime assert(@typeInfo(T) == .float);
return switch (@typeInfo(T).float.bits) {
16 => 5,
32 => 8,
64 => 11,
80 => 15,
128 => 15,
else => @compileError("unknown floating point type " ++ @typeName(T)),
};
}