/rust/registry/src/index.crates.io-1949cf8c6b5b557f/fastnum-0.7.4/src/bint/strict.rs
Line | Count | Source |
1 | | macro_rules! strict_impl { |
2 | | ($Ty: ident, $sign: ident) => { |
3 | | #[doc = doc::strict::impl_desc!()] |
4 | | impl<const N: usize> $Ty<N> { |
5 | | #[doc = doc::strict::strict_add!($sign 256)] |
6 | | #[must_use = doc::must_use_op!()] |
7 | | #[inline(always)] |
8 | 0 | pub const fn strict_add(self, rhs: Self) -> Self { |
9 | 0 | Self(self.0.strict_add(rhs.0)) |
10 | 0 | } Unexecuted instantiation: <fastnum::bint::uint::UInt<2>>::strict_add Unexecuted instantiation: <fastnum::bint::int::Int<_>>::strict_add Unexecuted instantiation: <fastnum::bint::uint::UInt<_>>::strict_add |
11 | | |
12 | | #[doc = doc::strict::strict_sub!($sign 256)] |
13 | | #[must_use = doc::must_use_op!()] |
14 | | #[inline(always)] |
15 | 0 | pub const fn strict_sub(self, rhs: Self) -> Self { |
16 | 0 | Self(self.0.strict_sub(rhs.0)) |
17 | 0 | } Unexecuted instantiation: <fastnum::bint::uint::UInt<2>>::strict_sub Unexecuted instantiation: <fastnum::bint::uint::UInt<16>>::strict_sub Unexecuted instantiation: <fastnum::bint::uint::UInt<17>>::strict_sub Unexecuted instantiation: <fastnum::bint::uint::UInt<1>>::strict_sub Unexecuted instantiation: <fastnum::bint::uint::UInt<3>>::strict_sub Unexecuted instantiation: <fastnum::bint::uint::UInt<4>>::strict_sub Unexecuted instantiation: <fastnum::bint::uint::UInt<5>>::strict_sub Unexecuted instantiation: <fastnum::bint::uint::UInt<6>>::strict_sub Unexecuted instantiation: <fastnum::bint::uint::UInt<7>>::strict_sub Unexecuted instantiation: <fastnum::bint::uint::UInt<8>>::strict_sub Unexecuted instantiation: <fastnum::bint::uint::UInt<9>>::strict_sub Unexecuted instantiation: <fastnum::bint::uint::UInt<10>>::strict_sub Unexecuted instantiation: <fastnum::bint::uint::UInt<11>>::strict_sub Unexecuted instantiation: <fastnum::bint::uint::UInt<12>>::strict_sub Unexecuted instantiation: <fastnum::bint::uint::UInt<13>>::strict_sub Unexecuted instantiation: <fastnum::bint::uint::UInt<14>>::strict_sub Unexecuted instantiation: <fastnum::bint::uint::UInt<15>>::strict_sub Unexecuted instantiation: <fastnum::bint::int::Int<_>>::strict_sub Unexecuted instantiation: <fastnum::bint::uint::UInt<_>>::strict_sub |
18 | | |
19 | | #[doc = doc::strict::strict_div!($sign 256)] |
20 | | #[must_use = doc::must_use_op!()] |
21 | | #[inline(always)] |
22 | 0 | pub const fn strict_div(self, rhs: Self) -> Self { |
23 | 0 | Self(self.0.strict_div(rhs.0)) |
24 | 0 | } Unexecuted instantiation: <fastnum::bint::int::Int<_>>::strict_div Unexecuted instantiation: <fastnum::bint::uint::UInt<_>>::strict_div |
25 | | |
26 | | #[doc = doc::strict::strict_div_euclid!($sign 256)] |
27 | | #[must_use = doc::must_use_op!()] |
28 | | #[inline(always)] |
29 | 0 | pub const fn strict_div_euclid(self, rhs: Self) -> Self { |
30 | 0 | Self(self.0.strict_div_euclid(rhs.0)) |
31 | 0 | } Unexecuted instantiation: <fastnum::bint::int::Int<_>>::strict_div_euclid Unexecuted instantiation: <fastnum::bint::uint::UInt<_>>::strict_div_euclid |
32 | | |
33 | | #[doc = doc::strict::strict_rem!($sign 256)] |
34 | | #[must_use = doc::must_use_op!()] |
35 | | #[inline(always)] |
36 | 0 | pub const fn strict_rem(self, rhs: Self) -> Self { |
37 | 0 | Self(self.0.strict_rem(rhs.0)) |
38 | 0 | } Unexecuted instantiation: <fastnum::bint::int::Int<_>>::strict_rem Unexecuted instantiation: <fastnum::bint::uint::UInt<_>>::strict_rem |
39 | | |
40 | | #[doc = doc::strict::strict_rem_euclid!($sign 256)] |
41 | | #[must_use = doc::must_use_op!()] |
42 | | #[inline(always)] |
43 | 0 | pub const fn strict_rem_euclid(self, rhs: Self) -> Self { |
44 | 0 | Self(self.0.strict_rem_euclid(rhs.0)) |
45 | 0 | } Unexecuted instantiation: <fastnum::bint::int::Int<_>>::strict_rem_euclid Unexecuted instantiation: <fastnum::bint::uint::UInt<_>>::strict_rem_euclid |
46 | | |
47 | | #[doc = doc::strict::strict_shl!($sign 256)] |
48 | | #[must_use = doc::must_use_op!()] |
49 | | #[inline(always)] |
50 | 0 | pub const fn strict_shl(self, rhs: ExpType) -> Self { |
51 | 0 | Self(self.0.strict_shl(rhs)) |
52 | 0 | } Unexecuted instantiation: <fastnum::bint::uint::UInt<2>>::strict_shl Unexecuted instantiation: <fastnum::bint::int::Int<_>>::strict_shl Unexecuted instantiation: <fastnum::bint::uint::UInt<_>>::strict_shl |
53 | | |
54 | | #[doc = doc::strict::strict_shr!($sign 256)] |
55 | | #[must_use = doc::must_use_op!()] |
56 | | #[inline(always)] |
57 | 0 | pub const fn strict_shr(self, rhs: ExpType) -> Self { |
58 | 0 | Self(self.0.strict_shr(rhs)) |
59 | 0 | } Unexecuted instantiation: <fastnum::bint::uint::UInt<2>>::strict_shr Unexecuted instantiation: <fastnum::bint::int::Int<_>>::strict_shr Unexecuted instantiation: <fastnum::bint::uint::UInt<_>>::strict_shr |
60 | | |
61 | | #[doc = doc::strict::strict_pow!($sign 256)] |
62 | | #[must_use = doc::must_use_op!()] |
63 | | #[inline(always)] |
64 | 0 | pub const fn strict_pow(self, exp: ExpType) -> Self { |
65 | 0 | Self(self.0.strict_pow(exp)) |
66 | 0 | } Unexecuted instantiation: <fastnum::bint::int::Int<_>>::strict_pow Unexecuted instantiation: <fastnum::bint::uint::UInt<_>>::strict_pow |
67 | | |
68 | | #[doc = doc::strict::strict_neg!($sign 256)] |
69 | | #[must_use = doc::must_use_op!()] |
70 | | #[inline(always)] |
71 | 0 | pub const fn strict_neg(self) -> Self { |
72 | 0 | self.checked_neg().expect("attempt to negate with overflow") |
73 | 0 | } Unexecuted instantiation: <fastnum::bint::int::Int<_>>::strict_neg Unexecuted instantiation: <fastnum::bint::uint::UInt<_>>::strict_neg |
74 | | } |
75 | | }; |
76 | | } |
77 | | |
78 | | pub(crate) use strict_impl; |