Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
oscbyspro committed Dec 14, 2023
1 parent faf33ab commit 144917a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 34 deletions.
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,6 @@ Int256(4) / Int(4), UInt256(4) / UInt(4)
Int256(5) % Int(5), UInt256(5) % UInt(5)
```

> [!NOTE]
> The `Digit` type is `Int` when `Self` is signed, and `UInt` otherwise.
### ⭐️ Feature: Swift.StaticBigInt

`StaticBigInt` is disabled by default. You enable it in `Package.swift`.

> [!NOTE]
> You can use `StaticString` until `StaticBigInt` becomes available.
<a name="nbkflexiblewidthkit"/>

## [NBKFlexibleWidthKit][FLX/D] ([Sources][FLX/S], [Tests][FLX/T], [Benchmarks][FLX/B])
Expand Down Expand Up @@ -146,9 +136,9 @@ NBKFibonacciXL(10_000_000) // 2.3s on MacBook Pro, 13-inch, M1, 2020
But you can also step through it manually:

```swift
public mutating func increment() { ... } // index + 1
public mutating func decrement() { ... } // index - 1
public mutating func double() { ... } // index * 2
mutating func increment() { ... } // index + 1
mutating func decrement() { ... } // index - 1
mutating func double() { ... } // index * 2
```

<a name="installation"/>
Expand Down
8 changes: 0 additions & 8 deletions Sources/NBKDoubleWidthKit/NBKDoubleWidth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,6 @@ import NBKCoreKit
/// Int256(5) % Int(5), UInt256(5) % UInt(5)
/// ```
///
/// - Note: The `Digit` type is `Int` when `Self` is signed, and `UInt` otherwise.
///
/// ### ⭐️ Feature: StaticBigInt
///
/// `StaticBigInt` is disabled by default. You enable it in `Package.swift`.
///
/// - Note: You can use `StaticString` until `StaticBigInt` becomes available.
///
@frozen public struct NBKDoubleWidth<High>: ExpressibleByStringLiteral,
NBKFixedWidthInteger, MutableCollection, RandomAccessCollection where
High: NBKFixedWidthInteger, High.Digit: NBKCoreInteger<UInt> {
Expand Down
18 changes: 5 additions & 13 deletions Sources/Numberick/Documentation.docc/Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,11 @@ Int256(4) / Int(4), UInt256(4) / UInt(4)
Int256(5) % Int(5), UInt256(5) % UInt(5)
```

- Note: The `Digit` type is `Int` when `Self` is signed, and `UInt` otherwise.

### ⭐️ Feature: StaticBigInt

`StaticBigInt` is disabled by default. You enable it in `Package.swift`.

- Note: You can use `StaticString` until `StaticBigInt` becomes available.
## NBKFlexibleWidthKit

> [!IMPORTANT]
> It's a work in progress. I may rework it at any time.
## NBKFlexibleWidthKit

### Models

- ``NBKFibonacciXL``
Expand All @@ -120,15 +112,15 @@ NBKFibonacciXL(5) // (index: 5, element: 5, next: 8)
It uses a fast double-and-add algorithm:

```swift
NBKFibonacciXL(10_000_000) // 2.3s on M1 MacBook Pro
NBKFibonacciXL(10_000_000) // 2.3s on MacBook Pro, 13-inch, M1, 2020
```

But you can also step through it manually:

```swift
public mutating func increment() { ... } // index + 1
public mutating func decrement() { ... } // index - 1
public mutating func double() { ... } // index * 2
mutating func increment() { ... } // index + 1
mutating func decrement() { ... } // index - 1
mutating func double() { ... } // index * 2
```

## Topics
Expand Down

0 comments on commit 144917a

Please sign in to comment.