diff options
| author | Rue <78876133+IOKG04@users.noreply.github.com> | 2025-07-28 14:54:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-28 14:54:52 +0200 |
| commit | 5381e7891dcdd7b6a9e74250cdcce221fe464cdc (patch) | |
| tree | 4c74744ed84120dccae6dc9811ce945911108a17 /lib/std/math/float.zig | |
| parent | 84ae54fbe64a15301317716e7f901d81585332d5 (diff) | |
| parent | dea3ed7f59347e87a1b8fa237202873988084ae8 (diff) | |
| download | zig-5381e7891dcdd7b6a9e74250cdcce221fe464cdc.tar.gz zig-5381e7891dcdd7b6a9e74250cdcce221fe464cdc.zip | |
Merge branch 'ziglang:master' into some-documentation-updates-0
Diffstat (limited to 'lib/std/math/float.zig')
| -rw-r--r-- | lib/std/math/float.zig | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/std/math/float.zig b/lib/std/math/float.zig index df7d7fe1ab..6ffbd85bd2 100644 --- a/lib/std/math/float.zig +++ b/lib/std/math/float.zig @@ -4,8 +4,6 @@ const assert = std.debug.assert; const expect = std.testing.expect; const expectEqual = std.testing.expectEqual; -pub const Sign = enum(u1) { positive, negative }; - pub fn FloatRepr(comptime Float: type) type { const fractional_bits = floatFractionalBits(Float); const exponent_bits = floatExponentBits(Float); @@ -14,7 +12,7 @@ pub fn FloatRepr(comptime Float: type) type { mantissa: StoredMantissa, exponent: BiasedExponent, - sign: Sign, + sign: std.math.Sign, pub const StoredMantissa = @Type(.{ .int = .{ .signedness = .unsigned, @@ -69,7 +67,7 @@ pub fn FloatRepr(comptime Float: type) type { /// This currently truncates denormal values, which needs to be fixed before this can be used to /// produce a rounded value. - pub fn reconstruct(normalized: Normalized, sign: Sign) Float { + pub fn reconstruct(normalized: Normalized, sign: std.math.Sign) Float { if (normalized.exponent > BiasedExponent.max_normal.unbias()) return @bitCast(Repr{ .mantissa = 0, .exponent = .infinite, |
