Skip to content

Commit 35d244e

Browse files
committed
Update documentation and package definition.
1 parent f842839 commit 35d244e

File tree

2 files changed

+26
-23
lines changed

2 files changed

+26
-23
lines changed

Package.swift

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// NumberKit
55
//
66
// Created by Matthias Zenger on 01/05/2017.
7-
// Copyright © 2015-2023 Matthias Zenger. All rights reserved.
7+
// Copyright © 2015-2024 Matthias Zenger. All rights reserved.
88
//
99
// Licensed under the Apache License, Version 2.0 (the "License");
1010
// you may not use this file except in compliance with the License.
@@ -23,20 +23,16 @@ import PackageDescription
2323

2424
let package = Package(
2525
name: "NumberKit",
26-
// Products define the executables and libraries produced by a package, and make them visible
27-
// to other packages.
26+
platforms: [
27+
.macOS("13.3"),
28+
.iOS(.v13),
29+
.tvOS(.v13)
30+
],
2831
products: [
2932
.library(name: "NumberKit", targets: ["NumberKit"]),
3033
],
31-
32-
// Dependencies declare other packages that this package depends on.
33-
// e.g. `.package(url: /* package url */, from: "1.0.0"),`
3434
dependencies: [
3535
],
36-
37-
// Targets are the basic building blocks of a package. A target can define a module or
38-
// a test suite. Targets can depend on other targets in this package, and on products
39-
// in packages which this package depends on.
4036
targets: [
4137
.target(name: "NumberKit",
4238
dependencies: [],
@@ -45,7 +41,5 @@ let package = Package(
4541
dependencies: ["NumberKit"],
4642
exclude: ["Info.plist"]),
4743
],
48-
49-
// Required Swift language version.
5044
swiftLanguageVersions: [.v5]
5145
)

README.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# Swift NumberKit
22

3-
[![Platforms: macOS, iOS, Linux](https://img.shields.io/badge/Platforms-macOS,%20iOS,%20Linux-blue.svg?style=flat)](https://developer.apple.com/osx/) [![Language: Swift 5.7](https://img.shields.io/badge/Language-Swift%205.7-green.svg?style=flat)](https://developer.apple.com/swift/) [![IDE: Xcode 14](https://img.shields.io/badge/IDE-Xcode%2014-orange.svg?style=flat)](https://developer.apple.com/xcode/) [![Package managers: SwiftPM, Carthage](https://img.shields.io/badge/Package%20managers-SwiftPM,%20Carthage-8E64B0.svg?style=flat)](https://github.com/Carthage/Carthage) [![License: Apache](http://img.shields.io/badge/License-Apache-lightgrey.svg?style=flat)](https://raw.githubusercontent.com/objecthub/swift-numberkit/master/LICENSE)
3+
[![Platforms: macOS, iOS, Linux](https://img.shields.io/badge/Platforms-macOS,%20iOS,%20Linux-blue.svg?style=flat)](https://developer.apple.com/osx/) [![Language: Swift 5.9](https://img.shields.io/badge/Language-Swift%205.9-green.svg?style=flat)](https://developer.apple.com/swift/) [![IDE: Xcode 15](https://img.shields.io/badge/IDE-Xcode%2015-orange.svg?style=flat)](https://developer.apple.com/xcode/) [![Package managers: SwiftPM, Carthage](https://img.shields.io/badge/Package%20managers-SwiftPM,%20Carthage-8E64B0.svg?style=flat)](https://github.com/Carthage/Carthage) [![License: Apache](http://img.shields.io/badge/License-Apache-lightgrey.svg?style=flat)](https://raw.githubusercontent.com/objecthub/swift-numberkit/master/LICENSE)
44

55
## Overview
66

77
This is a framework implementing advanced numeric data types for the Swift programming
8-
language on macOS, iOS and Linux. Currently, the framework provides three new numeric types,
9-
each represented as a struct:
8+
language on macOS, iOS and Linux. Currently, the framework provides four new numeric types,
9+
each represented as a struct or enumeration:
1010

11-
1. `BigInt`: arbitrary-precision signed integers
11+
1. `BigInt`: arbitrary-size signed integers
12+
2. `Integer`: arbitrary-size signed integers whose implementation depends on the size
13+
of the represented value.
1214
2. `Rational`: signed rational numbers
1315
3. `Complex`: complex floating-point numbers
1416

@@ -21,12 +23,20 @@ real, generic enough foundation (and still isn't).
2123

2224
## BigInt
2325

24-
`BigInt` objects are immutable, signed, arbitrary-precision integers that can be used as a
26+
`BigInt` values are immutable, signed, arbitrary-size integers that can be used as a
2527
drop-in replacement for the existing binary integer types of Swift 5.
2628
[Struct `BigInt`](https://github.com/objecthub/swift-numberkit/blob/master/Sources/NumberKit/BigInt.swift) defines all
27-
the standard arithmetic integer operations and implements the corresponding protocols defined
28-
in the standard library.
29+
the standard arithmetic integer operations and implements the corresponding protocols provided
30+
by Swift.
2931

32+
## Integer
33+
34+
`Integer` values are immutable, signed, arbitrary-size integers that can be used as a
35+
drop-in replacement for the existing binary integer types of Swift 5. As opposed to `BigInt`,
36+
the representation of values is chosen to optimize for memory size and performance of
37+
airthmetic operations. [Enum `Integer`](https://github.com/objecthub/swift-numberkit/blob/master/Sources/NumberKit/Integer.swift)
38+
defines all the standard arithmetic integer operations and implements the corresponding protocols
39+
provided by the Swift standard library.
3040

3141
## Rational
3242

@@ -35,7 +45,6 @@ defines immutable, rational numbers based on an existing signed integer
3545
type `T`, like `Int32`, `Int64`, or `BigInt`. A rational number is a signed number that can
3646
be expressed as the quotient of two integers _a_ and _b_: _a / b_.
3747

38-
3948
## Complex
4049

4150
[Struct `Complex<T>`](https://github.com/objecthub/swift-numberkit/blob/master/Sources/NumberKit/Complex.swift)
@@ -47,12 +56,12 @@ where _i_ is the _imaginary unit_.
4756

4857
The following technologies are needed to build the components of the _Swift NumberKit_ framework:
4958

50-
- [Xcode 14](https://developer.apple.com/xcode/)
51-
- [Swift 5.8](https://developer.apple.com/swift/)
59+
- [Xcode 15](https://developer.apple.com/xcode/)
60+
- [Swift 5.9](https://developer.apple.com/swift/)
5261
- [Swift Package Manager](https://swift.org/package-manager/)
5362
- macOS, iOS or Linux
5463

5564
## Copyright
5665

5766
Author: Matthias Zenger (<[email protected]>)
58-
Copyright © 2016-2023 Matthias Zenger. All rights reserved.
67+
Copyright © 2016-2024 Matthias Zenger. All rights reserved.

0 commit comments

Comments
 (0)