Math::Fibonacci(3pm)

πŸ“¦
version 1.5 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Math::Fibonacci πŸ’–

okay bestie, pull up a chair, because today we're talking about the perl manual page for Math::Fibonacci β€” like, the User Contributed Perl Documentation one? yeah, that one. Fibonacci numbers, but make it perl. no cap, we're doing math and it's gonna slay. πŸ¦‹


✨ NAME ✨

Math::Fibonacci β€” it's Fibonacci numbers, babe. that's the whole vibe. 🌸

πŸŽ€ VERSION πŸŽ€

$Revision: 1.5 $

that's it, that's the version, noted and archived, periodt. πŸ’…

🌈 SYNOPSIS 🌈

okay so here's how you actually use it, copy-paste girlies rise:

use Math::Fibonacci qw(term series decompose);

my $term = term ( 42 );
my @series = series ( 42 );
my @sum = decompose ( 65535 );

look how cute that is. you import term, series, and decompose, then you just… ask for stuff. iconic behaviour honestly. ✨

πŸ”₯ DESCRIPTION πŸ”₯

This module provides a few functions related to Fibonacci numbers. that's it, that's the summary, no essays, just vibes and numbers. 🧚

πŸ‘‘ EXPORTS ON REQUEST πŸ‘‘

here's what you can ask it to hand over when you use it β€” bestie, they're opt-in, so you gotta name them yourself:

  • term()
  • series()
  • decompose()
  • isfibonacci()

(no commas between them in the original list, and honestly? we respect the chaos. πŸ™ˆ)

πŸ’œ FUNCTIONS πŸ’œ

term($n)

Returns the $n-th term of the Fibonacci sequence. ✨

and here's the juicy part β€” it's computed with the fast algorithm:

F(n) ~ g^n/sqrt(5)

where g is the golden ratio, and that little ~ means "take the nearest integer". so it's not summing a billion tiny numbers, it just ✨ vibes ✨ its way to the answer. main character energy fr fr. πŸ’…

series($n)

Computes and returns the first $n Fibonacci numbers. a whole lineup. a little squad. 🫢

decompose($int)

Decomposes $int into the sum of Fibonacci numbers. Returns the list of Fibonacci numbers. it takes your big number apart like unboxing haul and hands you back the pieces. πŸ’–

isfibonacci($int)

Returns the sequence number of $int if it is a Fibonacci number β€” or a non-true value if it is not. so basically a vibe check for numbers: either it tells you where it sits in the lineup, or it simply does not. 😭


🌟 AUTHOR 🌟

Vipul Ved Prakash, <mail@vipul.net> β€” give them their flowers, they wrote the whole thing. 🌸

πŸ’€ LICENSE πŸ’€

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. so like, go wild, just read the license first, bestie. πŸ‘‘


also real quick β€” the SEE ALSO section? yeah, there isn't one. the page just ends. no extra reading, we're free. πŸ•ŠοΈ

and that's the whole page, bestie!! this was Math::Fibonacci, documented for perl v5.36.0, dated 2022-10-15, and you read it top to bottom like a scholar. so proud. go compute some Fibonacci numbers and text me the results. mwah. πŸ’–βœ¨πŸ’…πŸ¦‹πŸŒΈπŸŽ€

πŸ“¦ where this page comes from