Puppet Function: math::fibonacci

Defined in:
functions/fibonacci.pp
Function type:
Puppet Language

Summary

Calculate the fibonacci sequence for the given number

Overview

math::fibonacci(Numeric $n, Enum[table,binet] $method = 'table')Integer
Note:

The input value maxes out at 27 because it takes too long to calclulate

Note:

Example of how to perform this calculation www.wikihow.com/Calculate-the-Fibonacci-Sequence

Parameters:

  • n (Numeric)
  • method (Enum[table,binet]) (defaults to: 'table')

Returns:

  • (Integer)


6
7
8
# File 'functions/fibonacci.pp', line 6

function math::fibonacci(Numeric $n, Enum[table,binet] $method = 'table') >> Integer {
  call("math::fibonacci::${method}", $n)
}