NumericAnnex icon indicating copy to clipboard operation
NumericAnnex copied to clipboard

Compiling for iOS fails

Open rderimay opened this issue 3 years ago • 3 comments

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!

rderimay avatar Jan 16 '23 09:01 rderimay

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.

xwu avatar Jan 16 '23 13:01 xwu

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 avatar Jan 17 '23 10:01 rderimay

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

rderimay avatar Jan 17 '23 13:01 rderimay