Skip to content

Commit

Permalink
Last documentation update.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgriebling committed Aug 14, 2023
1 parent 07287d3 commit 498d4d2
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,27 @@ Its functionality falls in the following categories:
- Primes: prime number testing, probable prime number generation and primorial
- Miscellaneous: random number generation, greatest common divisor, least common multiple, n-th root, square root modulo an odd prime, Jacobi symbol, Kronecker symbol, Factorial function, Binomial function, Fibonacci numbers, Lucas numbers and Bernoulli numbers
- Fractions: Standard arithmetic on fractions whose numerators and denominators are of unbounded size

## Protocol support

- Added `SignedInteger`, `BinaryInteger`, and `Numeric` protocol compliance.
- Optional support for `StaticBigInt` to allow `BigInt` number initialization
from very large integer literals. Uncomment the `BigInt-Extensions`
`StaticBigInt` support.

Why support protocols? By supporting them you have the ability to
formulate generic algorithms and make use of algorithms from others
that use the protocol type(s) you support. For example, `Strideable`
compliance is free (with `BinaryInteger`) and lets you do things like

```swift
for i in BInt(1)...10 {
print(i.words)
}
```

In addition, if a third party defines extensions for the supported protocols,
these can be easily adapted by just conforming to that protocol.

BigInt requires Swift 5.0. It also requires that the Int and UInt types be 64 bit types.

Expand Down

0 comments on commit 498d4d2

Please sign in to comment.