Post Reply 
(35S) Formula for Fibonacci Numbers
05-29-2014, 05:24 AM (This post was last modified: 06-15-2017 01:26 PM by Gene.)
Post: #1
(35S) Formula for Fibonacci Numbers
The formula finds the exact Fibonacci number for positive integer N on stack level X for N from 0 to 59, for higher values the result is approximate:

IP(((1+√5)÷2)^REGX÷√5+.4)-IDIV(REGX,56)-2*IDIV(REGX,58)-2*IDIV(REGX,59)

Improvements or alternative approaches welcome.

NB In case REGX is unfamiliar, access to REGX when entering a programme is via "EQN" key, setting algebraic mode, "R↓" key, giving access to registers x, y, z & t, & then choosing the desired register, ie REGX is the content of stack level X.
Find all posts by this user
Quote this message in a reply
Post Reply 




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