HP 48gII Advanced User's Reference Manual page 82

Graphing calculator
Hide thumbs Also See for 48gII:
Table of Contents

Advertisement

FIBT executes the TICKS command to record the execution time of FIB1 and FIB2 for a given value of n.
Level 1
Techniques used in FIBT
Structured programming. FIBT calls both FIB1 and FIB2.
!
Programmatic use of calculator clock. FIBT executes the TICKS command to record the start and finish of
!
each subprogram.
Labeling output. FIBT tags each execution time with a descriptive message.
!
Required Programs
FIB1 (page 2-2) calculates F
!
FIB2 (page 2-3) calculates F
!
FIBT program listing
Program:
«
DUP TICKS SWAP FIB1
SWAP TICKS SWAP
- BR 8192 /
"FIB1 TIME" TAG
ROT TICKS SWAP FIB2
TICKS
SWAP DROP SWAP
- BR 8192 /
"FIB2 TIME" TAG
»
`OFIBT K
Checksum: # 23164d
Bytes: 129
2-4 RPL Programming Examples
"
Level 3
"
n
F
n
using recursion.
n
using looping.
n
Comments:
Copies n, then executes FIB1, recording the start and
stop time.
Calculates the elapsed time, converts it to a real
number, and converts that number to seconds.
Leaves the answer returned by FIB1 in level 2.
Tags the execution time.
Executes FIB2, recording the start and stop time.
Drops the answer returned by FIB2 (FIB1 returned
the same answer). Calculates the elapsed time for
FIB2 and converts to seconds.
Tags the execution time.
Stores the program in FIBT.
Level 2
Level 1
FIB1 TIME: z
FIB2 TIME: z

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

49g+

Table of Contents