Math::Fibonacci - Fibonacci numbers.
$Revision: 1.5 $
use Math::Fibonacci qw(term series decompose);
my $term = term ( 42 );
my @series = series ( 42 );
my @sum = decompose ( 65535 );
This module provides a few functions related to Fibonacci numbers.
term(), series() decompose(), isfibonacci()
Returns the $n-th term of the Fibonacci sequence. The term is computed using the fast algorithm: F(n) ~ g^n/sqrt(5), where g is the golden ratio and ~ means "take the nearest integer".
F(n) ~ g^n/sqrt(5)
Computes and returns the first $n Fibonacci numbers.
Decomposes $int into the sum of Fibonacci numbers. Returns the list of Fibonacci numbers.
Returns the sequence number of $int if it is a Fibonacci number or a non-true value if it is not.
Vipul Ved Prakash, <firstname.lastname@example.org>
Copyright (c) 1999-2001, Vipul Ved Prakash.
This code is free software; you can redistribute it and/or modify it under the ARTISTIC license (a copy is included in the distribution) or under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
To install Math::Fibonacci, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.