Anyone know of any Swift-native or Swift-friendly BCD libraries?

Subject says it all. Working with large number arithmatic in real-world units and need extremely-high tolerances. Rounding errors inherent to Double types aren't acceptable in the application I'm working on. Any ideas?

Replies

Would NSDecimal work, or do you need more precision?

Hmm. Haven't thought about NSDecimalNumber in a long while.... It certainly has the precision I need, but it's quite non-Swifty. Was hoping for something that would fit a little more nicely into swift's value-type semantics. Looks like NSDecimal (the underlying value type) is still intentionally opaque, with no real useful handles outside of NSDecimalNumber. I guess I can move forward with it and hope for something better to come along later.