EasyManua.ls Logo

HP HP-28S - Comparison of Fibl and FIB2

HP HP-28S
341 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Example. Calculate
F6
and
FlO'
Note
that
FIB2
is faster
than
FIBl.
Calculate F
6
.
[USER
[
6
FI82
Calculate
FlO'
10
F I
82
3:
2:
8
1:
55
IilDmDIIllDDmII
__
Comparison
of
FIB1 and FIB2
FIBl calculates
intermediate
values
Fi
more
than
once,
while
FIB2
cal-
culates each
intermediate
Fi
only once. Consequently,
FIB2
is faster.
The difference in
speed
increases with
the
size
of
n because
the
time
required for FIBl grows exponentially
with
n,
while
the
time required
for
FIB2
grows only linearly
with
n.
The diagram below
shows
the
beginning steps
of
FIBl calculating
FlO'
Note
the
number
of
intermediate
calculations: 1
in
the
first row, 2 in
the
second row, 4 in
the
third
row,
and
8 in
the
fourth
row.
28:
Programming
Examples
249

Table of Contents

Other manuals for HP HP-28S

Related product manuals