Swiftpack.co - quickthyme/fib as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by quickthyme.
quickthyme/fib 0.0.1
CLI executable that asynchronously calculates fibonacci iterations to ridiculous depths. Written on and for Raspberry Pi (Raspbian) using Swift 5.
⭐️ 1
🕓 4 years ago
.package(url: "https://github.com/quickthyme/fib.git", from: "0.0.1")

fib

CLI executable for Raspberry Pi that calculates fibonacci iterations out to ridiculous depths.

✓ It uses "infinite integers" that enable sums of astronomical numbers.

✓ It uses asynchronous looping so that it can be implemented in a recursive style without stack limitations.

Given that the max iteration variable is limited to unsigned int, and assuming we can run it on a 64-bit platform, we should top out at a max depth of 9,223,372,036,854,775,807 !!!

🤯

Unfortunately, the Raspberry Pi, equipped with its limited memory capacity and my inefficient adding routine, has no hopes of ever reaching that number.

🤕

Regardless, I don't have an IBM system Z at home, and the Pi can still do several thousand iterations relatively quickly. Good enough for my personal fibonacci needs.

🧐



This project builds, tests, and runs on Raspbian Linux using Swift 5.0. It has package dependencies on QLoop and UIntfinity.

GitHub

link
Stars: 1
Last commit: 4 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics