diff --git a/README.md b/README.md index 53669336..f5bb2c37 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ - [The `Fallible` redemption arc](#overview-the-fallible-redemption-arc) - [The precondition `Guarantee` types](#overview-the-precondition-guarantee-types) - [The magic `Divider` constants](#overview-the-magic-divider-constants) + - [The arbitrary bit `Count` unification](#overview-the-arbitrary-bit-count-unification) @@ -113,8 +114,6 @@ This setup enables optimizations and omits unrelated metrics. These steps are cr ### The overpowered `BinaryInteger` -๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ› ๏ธ๐Ÿšง๐Ÿงฑ๐Ÿงฑ๐Ÿ—๏ธ๐Ÿงฑ๐Ÿงฑ๐Ÿšงโณ - ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Systems โ”‚ Arbitrary โ”‚ @@ -297,3 +296,17 @@ let typical = U8.division(random, by: divisor) as Fallible> let magical = U8.division(random, by: divider) as Fallible> precondition(typical == magical) // quotient, remainder, and error indicator ``` + + + +### The arbitrary bit `Count` unification + +> Please roll a D20 arcana check. + +An arbitrary integer's bit pattern extends infinitely, yet its bit pattern has an end. It must be this way, or it would not behave like its systems integer friends. As such, we need a different model to represent arbitrary integer sizes. `Count` fulfills our need by reinterpreting the last bit of a machine word as logarithmically infinite. + +``` +UXL.max = &0 +min ..< msb: [0, IX.max + 0] +msb ... max: [โˆž - IX.max, โˆž] โ‰ค log2(&0+1) +```