Counting Fibonacci numbers
The latest incarnation prints the n-th Fibonacci number where n is passed as an argument. Here, n is 1000:
perl -MMath::BigInt -e '$b=new Math::BigInt 1;($a,$b)=($b,$a+$b)while--$ARGV;print"$b\n"' 1000
This site is the personal weblog of Marc Mims. You can contact Marc
by sending e-mail to:
Marc writes here about cycling, programming, Linux, and other items of personal interest.
This site is syndicated with RSS.
CSS stolen from Tom Coates who didn't even complain.