Fix definition of some constants when sizeof(mp_limb_t)==4#282
Fix definition of some constants when sizeof(mp_limb_t)==4#282mohabsafey merged 1 commit intoalgebraic-solving:masterfrom
Conversation
|
I would have expected and I guess See |
|
|
Let's leave out 32-bit things because the piece of code we are discussing assumes a 64-bit context anyway. This is probably not explicitly specified in this file, but it should be if we aim to support 32-bit contexts: these dot products routines via splitting work precisely by accumulating things in 64 bit words to delay modular reductions. If 64 bits. This is specifically about GMP's If you did encounter a UB mention on |
|
I opened this PR for improving 32-bit support (as the branch name suggests), not for supporting 64-bit Windows. That will be addressed in the other PR if I have the time and energy. I acknowledge my mistake though: on Windows, it was |
Ah, I see, so my "let's leave out 32-bit things" was far from your initial idea, sorry for not getting that. Let's have a discussion about this soon, then, since I'm interested in that as well (this probably requires more changes and is related to work that I have in progress around these functions). |
|
This PR now allows 55/59 tests to pass under i686-linux. Combined with the last commit from #214, all tests pass. |
4eb6be3 to
462d3b4
Compare
|
Maybe merging this PR with #292 is relevant. Otherwise, I am fine with both |
|
The modifications here are fine for me. I have a small doubt about the |
Apparently,
1UL << 56is UB whensizeof(long)==4sizeof(mp_limb_t)==4.