pub inline fn floatMantissaBits(comptime T: type) comptime_int T: type189
190
191
192
193
194
195
196
197
198
199
200pub inline fn floatMantissaBits(comptime T: type) comptime_int {
comptime assert(@typeInfo(T) == .float);
return switch (@typeInfo(T).float.bits) {
16 => 10,
32 => 23,
64 => 52,
80 => 64,
128 => 112,
else => @compileError("unknown floating point type " ++ @typeName(T)),
};
}