07-23-2020, 11:32 AM
Complex Fibonacci Numbers
The routine below uses the Binet formula with real orders "x" to obtain the Complex Fibonacci numbers. For integer inputs you should get the known Fibonacci series, but it gets interesting when you use non-integer values for the input.
This link shows graphs of the function output values in a couple of cases.
Input: x in the X register.
The program listing is below, step #4 PHI is the golden ratio, ~1.6108339887...
The routine below uses the Binet formula with real orders "x" to obtain the Complex Fibonacci numbers. For integer inputs you should get the known Fibonacci series, but it gets interesting when you use non-integer values for the input.
This link shows graphs of the function output values in a couple of cases.
Input: x in the X register.
The program listing is below, step #4 PHI is the golden ratio, ~1.6108339887...
Code:
01 LBL "ZFIB"
superseded by version below
17 END