Post Reply 
(15C) Fibonacci Numbers
03-23-2017, 01:32 PM
Post: #2
RE: (15C) Fibonacci Numbers (bug with 15C LE?)
Loop Method – Joe Horn

Joe Horn provided a more accurate program which uses loops. It is slower, however should speed should not be a problem if a HP 15C Limited Edition or emulator is used. Full credit and thanks goes to Joe Horn for providing this program.

Code:

Step    Key    Code
001    LBL A    42, 21, 11
002    STO 0    44, 0
003    1    1
004    ENTER    36
005    0    0
006    LBL 1    42, 21, 1
007    +    40
008    LST X    43, 36
009    X<>Y    34
010    DSE 0    42, 5, 0
011    GTO 1    22, 1
012    RTN    43, 32

A nice part is that you don’t have to pre-store n in memory 0. This method is accurate for n ≤ 49.

Comparing Results
Here are some results of some selected n:

Code:

n    Approximation    Loop Method
6    8    8
15    610    610
16    987    987
22    17710.9999    17711
29    514228.9979    514229
36    14930351.92    14930352
40    102334154.4    102334155
44    701408728.7    701408733
49    7778741992    7778742049

Bug?

I manually calculated the approximation formula on my HP 15C LE (Limited Edition) and HP Prime for n = 44 and n = 49.

n = 44
HP15C LE: 701408728.7
HP Prime: 701408733.002

n = 49
HP 15C LE: 7778741992
HP Prime: 7778742049.02

I think we may have found a bug on the HP 15C LE.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(15C) Fibonacci Numbers - Eddie W. Shore - 03-23-2017, 03:22 AM
RE: (15C) Fibonacci Numbers (bug with 15C LE?) - Eddie W. Shore - 03-23-2017 01:32 PM
RE: (15C) Fibonacci Numbers - Albert Chan - 08-07-2023, 10:09 PM
RE: (15C) Fibonacci Numbers - Werner - 08-08-2023, 11:05 AM
RE: (15C) Fibonacci Numbers - Albert Chan - 08-08-2023, 11:44 AM
RE: (15C) Fibonacci Numbers - Thomas Klemm - 08-06-2023, 11:06 AM
RE: (15C) Fibonacci Numbers - Joe Horn - 08-06-2023, 04:49 PM
RE: (15C) Fibonacci Numbers - Thomas Klemm - 08-06-2023, 03:16 PM
RE: (15C) Fibonacci Numbers - Thomas Klemm - 08-07-2023, 10:49 PM
RE: (15C) Fibonacci Numbers - Werner - 08-08-2023, 12:06 PM



User(s) browsing this thread: 1 Guest(s)