diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-10-04 14:29:09 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-04 14:29:09 -0400 |
| commit | a28f2e0dd2d7b78464115bca4968f7c0befa6b28 (patch) | |
| tree | 1953c90e0c488588495abce1e76d35e3d98557b8 /lib/std/math/big.zig | |
| parent | 2454459ef5435081abe82724e873a74bd33a79af (diff) | |
| parent | 95fe86e3dbd3826ca0971853b275a409ac215c83 (diff) | |
| download | zig-a28f2e0dd2d7b78464115bca4968f7c0befa6b28.tar.gz zig-a28f2e0dd2d7b78464115bca4968f7c0befa6b28.zip | |
Merge pull request #9885 from Snektron/big-int-wrapping
Big int wrapping/saturating
Diffstat (limited to 'lib/std/math/big.zig')
| -rw-r--r-- | lib/std/math/big.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/std/math/big.zig b/lib/std/math/big.zig index 8c0f7f5e1e..e7f8a7fb34 100644 --- a/lib/std/math/big.zig +++ b/lib/std/math/big.zig @@ -5,6 +5,7 @@ pub const Rational = @import("big/rational.zig").Rational; pub const int = @import("big/int.zig"); pub const Limb = usize; const limb_info = @typeInfo(Limb).Int; +pub const SignedLimb = std.meta.Int(.signed, limb_info.bits); pub const DoubleLimb = std.meta.Int(.unsigned, 2 * limb_info.bits); pub const SignedDoubleLimb = std.meta.Int(.signed, 2 * limb_info.bits); pub const Log2Limb = std.math.Log2Int(Limb); @@ -19,6 +20,7 @@ test { _ = int; _ = Rational; _ = Limb; + _ = SignedLimb; _ = DoubleLimb; _ = SignedDoubleLimb; _ = Log2Limb; |
