Closed einar-triton closed 1 year ago
Looks good. We only want this for u32-based types though. So we shouldn't support remainder for BFieldElement
and XFieldElement
.
I might cherry-pick some stuff from this branch if that's OK with you, as I'm currenly working on u64 division where I could use the u32-remainder :)
Looks good. We only want this for u32-based types though. So we shouldn't support remainder for
BFieldElement
andXFieldElement
.
Gotcha.
I might cherry-pick some stuff from this branch if that's OK with you, as I'm currenly working on u64 division where I could use the u32-remainder :)
Naturally.
All tests pass. Clippy OK.
Please review.
I used your Rem
implementation and credited you with it in one of the commits.
I managed though to find a way of doing generic u64-division, but that function also returns the remainder. So I could use that function for both Rem
and Div
of
u64. So that deprecates the work you've done for
Remof
u64`.
This is inspired by the
ast::BinOp::Div
, and adds some previously missing tests forDiv
andMul
as well.