| ... | ... | @@ -112,17 +112,17 @@ pub fn FloatRepr(comptime Float: type) type { |
| 112 | 112 | /// This currently truncates denormal values, which needs to be fixed before this can be used to |
| 113 | 113 | /// produce a rounded value. |
| 114 | 114 | pub fn reconstruct(normalized: Normalized, sign: std.math.Sign) Float { |
| 115 | | if (normalized.exponent > BiasedExponent.max_normal.unbias()) return @bitCast(Repr{ |
| 115 | if (normalized.exponent > comptime BiasedExponent.max_normal.unbias()) return @bitCast(Repr{ |
| 116 | 116 | .mantissa = 0, |
| 117 | 117 | .exponent = .infinite, |
| 118 | 118 | .sign = sign, |
| 119 | 119 | }); |
| 120 | 120 | const mantissa = @as(Mantissa, 1 << fractional_bits) | normalized.fraction; |
| 121 | | if (normalized.exponent < BiasedExponent.min_normal.unbias()) return @bitCast(Repr{ |
| 121 | if (normalized.exponent < comptime BiasedExponent.min_normal.unbias()) return @bitCast(Repr{ |
| 122 | 122 | .mantissa = @truncate(std.math.shr( |
| 123 | 123 | Mantissa, |
| 124 | 124 | mantissa, |
| 125 | | BiasedExponent.min_normal.unbias() - normalized.exponent, |
| 125 | (comptime BiasedExponent.min_normal.unbias()) - normalized.exponent, |
| 126 | 126 | )), |
| 127 | 127 | .exponent = .denormal, |
| 128 | 128 | .sign = sign, |