Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is this library not expected to work on 32 bit? #48

Open
konsumlamm opened this issue Nov 29, 2021 · 6 comments · May be fixed by #141
Open

Why is this library not expected to work on 32 bit? #48

konsumlamm opened this issue Nov 29, 2021 · 6 comments · May be fixed by #141

Comments

@konsumlamm
Copy link
Contributor

The readme states this under Current limitations and possible enhancements, but I don't see any obvious reason why this is the case. Could anyone elaborate on what exactly breaks on 32 bit platforms?

@pietroppeter
Copy link
Contributor

I am assuming that is because in operations like realUnsignedAddition and multiplication you use a tmp variable that is a uint64 and I would not expect that to be available on a 32-bit architecture

@konsumlamm
Copy link
Contributor Author

I've never heard of uint64 not being available on 32 bit platforms, it'll just be slower (since it's stored as two 32 bit values).

@pietroppeter
Copy link
Contributor

You are right. That was my assumption, so maybe it works on a 32 bit system or it has another issue. What I can tell you is that I created that line in the readme starting from a todo file (now removed), saying "fix the library in 32 bit". See https://github.com/nim-lang/bigints/pull/32/files

Maybe @def- knows more about this?

@def-
Copy link
Member

def- commented Nov 30, 2021

I think I added that since I found some bugs when running it on 32bit, I assume wrong results. But haven't tried in a while obviously, so not sure what the status is.

@konsumlamm
Copy link
Contributor Author

I think I added that since I found some bugs when running it on 32bit, I assume wrong results. But haven't tried in a while obviously, so not sure what the status is.

Do you remember any specific examples that didn't work? If not, I don't think it makes much sense to keep the note about 32 bit.

@def-
Copy link
Member

def- commented Nov 30, 2021

Just the internal tests I guess

@konsumlamm konsumlamm linked a pull request Dec 3, 2023 that will close this issue
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 a pull request may close this issue.

3 participants