| ... | @@ -4,7 +4,7 @@ const expect = std.testing.expect; | ... | @@ -4,7 +4,7 @@ const expect = std.testing.expect; |
| 4 | | 4 | |
| 5 | /// Creates a raw "1.0" mantissa for floating point type T. Used to dedupe f80 logic. | 5 | /// Creates a raw "1.0" mantissa for floating point type T. Used to dedupe f80 logic. |
| 6 | fn mantissaOne(comptime T: type) comptime_int { | 6 | fn mantissaOne(comptime T: type) comptime_int { |
| 7 | return if (T == f80) 1 << floatFractionalBits(T) else 0; | 7 | return if (@typeInfo(T).Float.bits == 80) 1 << floatFractionalBits(T) else 0; |
| 8 | } | 8 | } |
| 9 | | 9 | |
| 10 | /// Creates floating point type T from an unbiased exponent and raw mantissa. | 10 | /// Creates floating point type T from an unbiased exponent and raw mantissa. |