https://github.com/zeionara/nest
A library containing some basic functions for approximate computation of mathematical values
https://github.com/zeionara/nest
Last synced: 11 months ago
JSON representation
A library containing some basic functions for approximate computation of mathematical values
- Host: GitHub
- URL: https://github.com/zeionara/nest
- Owner: zeionara
- License: apache-2.0
- Created: 2021-08-24T21:51:20.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-09-26T21:59:43.000Z (over 4 years ago)
- Last Synced: 2025-01-02T07:46:16.987Z (about 1 year ago)
- Language: Swift
- Size: 232 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nest
**N**umerical **est**imation tool - a library containing some basic functions for approximate computation of some mathematical values.


## Usage
Include into your global `dependencies` section in the `Package.swift` the following statement:
```sh
.package(url: "https://github.com/zeionara/nest.git", .branch("oauth"))
```
Then for making it available in the source code of your modules you need to append the respective call for every desired product declaration as well:
```sh
.product(name: "nest", package: "nest")
```
After these prerequisites the library can be imported and it's components will become available:
```swift
import nest
public func constantFive(_ x: Double) -> Double {
return Double(5.0)
}
let firstValue = 1.0
let lastValue = 3.0
let result = integrate(constantFive, from: firstValue, to: lastValue)
print("The integral of the constant function y = 5 from \(String(format: "%.3f", firstValue)) to \(String(format: "%.3f", lastValue)) is equal to \(String(format: "%.3f", result))!")
// Output: The integral of the constant function y = 5 from 1.000 to 3.000 is equal to 10.000!
```
## Building
The following command must be executed for packaging the library contents:
```sh
swift build --product nest
```