pub inline fn snan(comptime Type: type) Type Type: type291
292
293
294
295
296
297
298
299
300
301pub inline fn snan(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) - 2),
);
}