Fibint
Compute Fibonacci numbers efficiently using finite fields
Install / Use
/learn @ruuda/FibintREADME
fibint
Compute Fibonacci numbers efficiently using finite fields. This allows for Fibonacci numbers to be computed from a closed-form expression, by using only integer arithmetic. For any integer width, this makes it possible to compute all Fibonacci numbers representable by that integer, without resorting to floating-point numbers or wider integers.
How it works
Instead of using the closed-form expression for computing the n-th Fibonacci number in the field of real numbers, it uses an analogous closed-form expression in a finite field that is big enough to contain the largest representable Fibonacci number.
See my blog post for a more thorough explanation.
Licence
This project is an implementation of a mathematical concept. The
implementation is licensed under the MIT license. See the file copying.
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
