Skip to content

Fix real root isolation when sizeof(long)==4#292

Merged
mohabsafey merged 1 commit intoalgebraic-solving:masterfrom
wegank:32-bit-fix-2
Mar 12, 2026
Merged

Fix real root isolation when sizeof(long)==4#292
mohabsafey merged 1 commit intoalgebraic-solving:masterfrom
wegank:32-bit-fix-2

Conversation

@wegank
Copy link
Contributor

@wegank wegank commented Mar 12, 2026

As mpz_get_ui returns a value of type unsigned long int, the following line

long long int index = mpz_get_ui(*q);

is only sound when sizeof(unsigned long int) == sizeof(long long int) holds. This PR fixes the cases where the identity is not satisfied.

Tested on 32-bit Linux in combination with #282.

@mohabsafey
Copy link
Contributor

This one also looks good to me

@mohabsafey mohabsafey merged commit 261f792 into algebraic-solving:master Mar 12, 2026
3 checks passed
@wegank wegank deleted the 32-bit-fix-2 branch March 12, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants