pub inline fn nan(comptime Type: type) Type Type: type275
276
277
278
279
280
281
282
283
284
285pub inline fn nan(comptime Type: type) Type {
const RuntimeType = switch (Type) {
else => Type,
comptime_float => f128, // any float type will do
};
return reconstructFloat(
RuntimeType,
floatExponentMax(RuntimeType) + 1,
mantissaOne(RuntimeType) | 1 << (floatFractionalBits(RuntimeType) - 1),
);
}