Copyright | Copyright (C) 2021 Yoo Chung |
---|---|
License | GPL-3.0-or-later |
Maintainer | dev@chungyc.org |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Some solutions to Problems.P30 of Ninety-Nine Haskell Problems.
Synopsis
- fibonacci' :: Integral a => a -> a
Documentation
fibonacci' :: Integral a => a -> a Source #
Computes the \(n\)th Fibonacci number with \(O(\log n)\) multiplications. Takes advantage of matrix multiplication and exponentiation.