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

Compiling for iOS fails #11

Open
rderimay opened this issue Jan 16, 2023 · 3 comments
Open

Compiling for iOS fails #11

rderimay opened this issue Jan 16, 2023 · 3 comments

Comments

@rderimay
Copy link

Hi! Thanks for this excellent library!

I tried to use it in a project that I wanted to compile for iOS and for Mac M1/M2 as an Made for iPad app.
I get this error when compiling:

I was wondering if you could have an idea how it can be solved?

Thanks!

@xwu
Copy link
Owner

xwu commented Jan 16, 2023

That's weird, because it would only give you this error if UInt is 32 bits; have you tried compiling again?

Also, I've not been maintaining this library actively for a while; it pre-dates significantly the very excellent swift-numerics library that has subsumed most of this functionality.

@rderimay
Copy link
Author

rderimay commented Jan 17, 2023

Yes. I don't exactly know the reason to be honest. It appears that the following code could/would solve the problem. I did not get the time to test it, but will check that in a near future. The Rational class of your library is what I need and I could not find an equivalent in swift-numerics.

#if arch(x86_64) || arch(arm64)
    let magic: UInt = 0x9e3779b97f4a7c15
#elseif arch(i386) || arch(arm)
    let magic: UInt = 0x9e3779b9
#endif

@rderimay
Copy link
Author

Ok. Forget it, it does not solve anything...

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

No branches or pull requests

2 participants