Skip to Main Content
Itanium® Architecture for Programmers: Understanding 64-Bit Processors and EPIC Principles
book

Itanium® Architecture for Programmers: Understanding 64-Bit Processors and EPIC Principles

by James S. Evans - Lawrence University, Gregory L. Trimper - viika
April 2003
Intermediate to advanced content levelIntermediate to advanced
576 pages
15h 13m
English
Pearson
Content preview from Itanium® Architecture for Programmers: Understanding 64-Bit Processors and EPIC Principles

11.7. Recursion for Fibonacci Numbers Revisited

We presented recursive and nonrecursive functions for computing numbers in the Fibonacci sequence in Chapter 10, representing two extreme computational models. Now we revisit the Fibonacci sequence with another algorithm adapted from a Pascal illustration by Rohl that avoids the unfortunate computational time for the branching form of recursion, while still being recursive in nature.

For convenience in setting up this algorithm, the correspondence between the index position n and each Fibonacci number Fn in the sequence will begin with a zeroth member, as follows:

					n        0        1        2        3        4        5        6        7        8       
 9        ...
Fn 0 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ARM System Developer's Guide

ARM System Developer's Guide

Andrew Sloss, Dominic Symes, Chris Wright
Intel Xeon Phi Processor High Performance Programming, 2nd Edition

Intel Xeon Phi Processor High Performance Programming, 2nd Edition

James Jeffers, James Reinders, Avinash Sodani

Publisher Resources

ISBN: 0131013726Purchase book