ninetynine-1.3.0: Ninety-Nine Haskell Problems
CopyrightCopyright (C) 2021 Yoo Chung
LicenseGPL-3.0-or-later
Maintainerdev@chungyc.org
Safe HaskellSafe-Inferred
LanguageGHC2021

Solutions.P30

Description

Some solutions to Problems.P30 of Ninety-Nine Haskell Problems.

Synopsis

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.