@@ -59,94 +59,7 @@ impl MinInt for i256 {
59
59
const MAX : Self = Self ( [ u64:: MAX ; 4 ] ) ;
60
60
}
61
61
62
- // impl Int for u256 {
63
- // type OtherSign = i256;
64
-
65
- // type UnsignedInt = u256;
66
-
67
- // fn unsigned(self) -> Self::UnsignedInt {
68
- // self
69
- // }
70
-
71
- // fn from_unsigned(unsigned: Self::UnsignedInt) -> Self {
72
- // todo!()
73
- // }
74
-
75
- // fn from_bool(b: bool) -> Self {
76
- // todo!()
77
- // }
78
-
79
- // fn logical_shr(self, other: u32) -> Self {
80
- // todo!()
81
- // }
82
-
83
- // fn abs_diff(self, other: Self) -> Self::UnsignedInt {
84
- // todo!()
85
- // }
86
-
87
- // fn is_zero(self) -> bool {
88
- // todo!()
89
- // }
90
-
91
- // fn wrapping_neg(self) -> Self {
92
- // todo!()
93
- // }
94
-
95
- // fn wrapping_add(self, other: Self) -> Self {
96
- // todo!()
97
- // }
98
-
99
- // fn wrapping_mul(self, other: Self) -> Self {
100
- // todo!()
101
- // }
102
-
103
- // fn wrapping_sub(self, other: Self) -> Self {
104
- // todo!()
105
- // }
106
-
107
- // fn wrapping_shl(self, other: u32) -> Self {
108
- // todo!()
109
- // }
110
-
111
- // fn wrapping_shr(self, other: u32) -> Self {
112
- // todo!()
113
- // }
114
-
115
- // fn rotate_left(self, other: u32) -> Self {
116
- // todo!()
117
- // }
118
-
119
- // fn overflowing_add(self, other: Self) -> (Self, bool) {
120
- // todo!()
121
- // }
122
-
123
- // fn leading_zeros(self) -> u32 {
124
- // todo!()
125
- // }
126
- // }
127
-
128
62
// impl Int for i256 {
129
-
130
- // fn unsigned(self) -> Self::UnsignedInt {
131
- // todo!()
132
- // }
133
-
134
- // fn from_unsigned(unsigned: Self::UnsignedInt) -> Self {
135
- // todo!()
136
- // }
137
-
138
- // fn from_bool(b: bool) -> Self {
139
- // todo!()
140
- // }
141
-
142
- // fn logical_shr(self, other: u32) -> Self {
143
- // todo!()
144
- // }
145
-
146
- // fn abs_diff(self, other: Self) -> Self::UnsignedInt {
147
- // todo!()
148
- // }
149
-
150
63
// fn is_zero(self) -> bool {
151
64
// self == Self::ZERO
152
65
// }
@@ -158,27 +71,7 @@ impl MinInt for i256 {
158
71
// fn wrapping_add(self, other: Self) -> Self {
159
72
// self.overflowing_add(other).0
160
73
// }
161
-
162
- // fn wrapping_mul(self, other: Self) -> Self {
163
- // todo!()
164
- // }
165
-
166
- // fn wrapping_sub(self, other: Self) -> Self {
167
- // todo!()
168
- // }
169
-
170
- // fn wrapping_shl(self, other: u32) -> Self {
171
- // todo!()
172
- // }
173
-
174
- // fn wrapping_shr(self, other: u32) -> Self {
175
- // todo!()
176
- // }
177
-
178
- // fn rotate_left(self, other: u32) -> Self {
179
- // todo!()
180
- // }
181
-
74
+ //
182
75
// fn overflowing_add(self, other: Self) -> (Self, bool) {
183
76
// let x0 = (u128::from(self.0[0])).wrapping_add(u128::from(other.0[0]));
184
77
// let v0 = x0 as u64;
@@ -204,10 +97,6 @@ impl MinInt for i256 {
204
97
205
98
// (Self([v0, v1, v2, v3]), c3 > 0)
206
99
// }
207
-
208
- // fn leading_zeros(self) -> u32 {
209
- // todo!()
210
- // }
211
100
// }
212
101
213
102
macro_rules! impl_common {
@@ -298,49 +187,6 @@ macro_rules! impl_common {
298
187
impl_common ! ( i256) ;
299
188
impl_common ! ( u256) ;
300
189
301
- // impl ops::Sub for u256 {
302
- // type Output = Self;
303
-
304
- // fn sub(self, rhs: Self) -> Self::Output {
305
- // todo!()
306
- // }
307
- // }
308
-
309
- // impl ops::Sub for i256 {
310
- // type Output = Self;
311
-
312
- // fn sub(self, rhs: Self) -> Self::Output {
313
- // todo!()
314
- // }
315
- // }
316
-
317
- // impl ops::SubAssign for u256 {
318
- // fn sub_assign(&mut self, rhs: Self) {
319
- // todo!()
320
- // }
321
- // }
322
-
323
- // impl ops::SubAssign for i256 {
324
- // fn sub_assign(&mut self, rhs: Self) {
325
- // todo!()
326
- // }
327
- // }
328
-
329
- // impl ops::Div for u256 {
330
- // type Output = Self;
331
-
332
- // fn div(self, rhs: Self) -> Self::Output {
333
- // todo!()
334
- // }
335
- // }
336
-
337
- // impl ops::Div for i256 {
338
- // type Output = Self;
339
-
340
- // fn div(self, rhs: Self) -> Self::Output {
341
- // todo!()
342
- // }
343
- // }
344
190
345
191
impl ops:: Shl < u32 > for u256 {
346
192
type Output = Self ;
@@ -350,54 +196,6 @@ impl ops::Shl<u32> for u256 {
350
196
}
351
197
}
352
198
353
- // impl ops::Shl<u32> for i256 {
354
- // type Output = Self;
355
-
356
- // fn shl(self, rhs: u32) -> Self::Output {
357
- // todo!()
358
- // }
359
- // }
360
-
361
- // impl ops::Shr<u32> for u256 {
362
- // type Output = Self;
363
-
364
- // fn shr(self, rhs: u32) -> Self::Output {
365
- // todo!()
366
- // }
367
- // }
368
-
369
- // impl ops::Shr<u32> for i256 {
370
- // type Output = Self;
371
-
372
- // fn shr(self, rhs: u32) -> Self::Output {
373
- // todo!()
374
- // }
375
- // }
376
-
377
- // impl ops::ShlAssign<i32> for u256 {
378
- // fn shl_assign(&mut self, rhs: i32) {
379
- // todo!()
380
- // }
381
- // }
382
-
383
- // impl ops::ShlAssign<i32> for i256 {
384
- // fn shl_assign(&mut self, rhs: i32) {
385
- // todo!()
386
- // }
387
- // }
388
-
389
- // impl ops::ShrAssign<u32> for u256 {
390
- // fn shr_assign(&mut self, rhs: u32) {
391
- // todo!()
392
- // }
393
- // }
394
-
395
- // impl ops::ShrAssign<u32> for i256 {
396
- // fn shr_assign(&mut self, rhs: u32) {
397
- // todo!()
398
- // }
399
- // }
400
-
401
199
macro_rules! word {
402
200
( 1 , $val: expr) => {
403
201
( ( $val >> ( 32 * 3 ) ) & Self :: from( WORD_LO_MASK ) ) as u64
0 commit comments