SkillAgentSearch skills...

AwesomeNumbersKit

Large number arithmetic in Swift

Install / Use

/learn @oscbyspro/AwesomeNumbersKit

README

AwesomeNumbersKit

Large number arithmetic in Swift.

| Package | Swift | iOS | iPadOS | Mac Catalyst | macOS | tvOS | watchOS | |:-------:|:-----:|:----:|:------:|:------------:|:-----:|:----:|:-------:| | 4.0.2 | 5.8 | 16.4 | 16.4 | 16.4 | 13.3 | 16.4 | 9.4 |

[!IMPORTANT] The development of this project has moved over to Numberick.

ANKCoreKit (Sources, Tests, Benchmarks)

Models, protocols, extensions and utilities underpinning this package.

Protocols

ANKFullWidthKit (Sources, Tests, Benchmarks)

A composable, large, fixed-width, two's complement, binary integer.

<table> <tr><td>:jigsaw:</td><td>Composable</td></tr> <tr><td>:two_hearts:</td><td>Two's Complement</td></tr> <tr><td>:european_castle:</td><td>Fixed Width Integer</td></tr> <tr><td>:book:</td><td>Trivial UInt Collection</td></tr> <tr><td>:rocket:</td><td>Single Digit Arithmetic</td></tr> </table>
typealias  Int256 = ANKFullWidth< Int128, UInt128>
typealias UInt256 = ANKFullWidth<UInt128, UInt128>

ANKSignedKit (Sources, Tests, Benchmarks)

A decorative, width agnostic, sign-and-magnitude, numeric integer.

<table> <tr><td>:ribbon:</td><td>Decorative</td></tr> <tr><td>:ringed_planet:</td><td>Sign & Magnitude</td></tr> <tr><td>:100:</td><td>Numeric</td></tr> <tr><td>:rocket:</td><td>Single Digit Arithmetic</td></tr> </table>
typealias Magnitude = UInt
let min = ANKSigned(Magnitude.max, as: FloatingPointSign.minus)
let max = ANKSigned(Magnitude.max, as: FloatingPointSign.plus )

Check out my other projects

Numberick is a more pragmatic solution to the same problem.

<!-- Links -->
View on GitHub
GitHub Stars6
CategoryDevelopment
Updated16d ago
Forks1

Languages

Swift

Security Score

90/100

Audited on Mar 17, 2026

No findings