Implementation of "**" and Swift 4 compatability
geozeke opened this issue · 4 comments
Greetings! This is an awesome library. Nice work.
I imported it to a project to run some tests, and ran into this error for the ** operator: Operator implementation without matching operator declaration. I commented out the static ** function and the few other functions that used ** and was able to still use the library for basic BInt operations (e.g. +,-). Maybe this is an incompatibility introduced in Swift 4?
Again, great job!
I also encountered that problem while testing, you just have to include both "MG SuperSwift.swift" and and "MG Basic Math.swift" in your project, both are in the sources folder. I will rewrite that so you only have to include one file in the future!
Thanks for the compliments, really appreciate that :)
I pushed the new version, you only have to include SMP.swift now. Please tell me if it works!
Super! I think you can mark this one as closed. The new single-file library works great. I've just used *= and + on some big numbers, but it seems to work well so far. I'm working on a project that manipulates integers near MAXINT. My final results fall below MAXINT, but some of the interim calculations overflow MAXINT. This library was just what I needed :-)
Thanks!