Repository navigation
3.0.0
This is a major release upgrading BigInt to the new integer protocols introduced in Swift 4 as part of SE-0104, Protocol-oriented integers.
- Adopting the new protocols involved major, breaking changes throughout the API. These aren't individually listed here.
- The
BigUIntstruct now provides inline storage for big integers that fit inside two words. This optimization speeds up conversions from built-in fixed-width integer types, amongst other frequent operations. BigIntandBigUIntimplements the newCodableprotocol. In both cases, values are encoded in an unkeyed container starting with a string indicating the sign ("+"or"-"), followed by a sequence of 64-bit unsigned integers representing component words, from least to most significant.- New method:
BigInt.modulo, contributed by @FabioTacke. BigUIntdoes not implementCollectionin this release. The collection of words is available in the standard read-onlywordsproperty. Direct public access to collection methods have been removed; if you have been manipulating big integers using collection methods, you need to rewrite your code. If you have a usecase that isn't covered by the public API, please submit a PR adding the missing functionality. (Public read-write access to the underlying storage insideBigUIntwill not be restored, though.)
BigInt is now part of the Attaswift project. The bundle identifiers in the supplied Xcode project have been updated accordingly.
Note that the URL for the package's Git repository has changed; please update your references.