Fix test_long::test_huge_rshift#3580
Conversation
|
I didn't check what's happening in |
1 similar comment
|
I didn't check what's happening in |
|
ok, I'll check it later. |
|
Yes, you are right. I can confirm that the fail case is |
|
@hrchu did you find the way to distinguish rshift and lshift? |
|
Will you push the new version to discuss more? I think we don't have much choice. Maybe we can make another small function for shared behavior, but I think having |
45f06d4 to
5c10aed
Compare
|
@youknowone pushed. have a look plz 🙏 |
df668d7 to
70e6059
Compare
youknowone
left a comment
There was a problem hiding this comment.
You were talking about 2 duplicated code patterns. I thought you were asking about duplication between them. Now I got it. I think the duplication can be resolved by making them as free functions.
3ef7915 to
e6bf543
Compare
e6bf543 to
987d9b9
Compare
|
@youknowone thank you for guidance! |

A BigUint is represented as a vector of BigDigits and it seems that in Rust no allocations can have a size larger than
isize::MAX.usize::MAXis sufficient for shifting purposes here.Guided by @youknowone in PyCon APAC 2022 spring sprint