[PD] converting decimal to binary

Mathieu Bouchard matju at artengine.ca
Sat Jul 1 02:53:47 CEST 2006


On Fri, 30 Jun 2006, Chuckk Hubbard wrote:

> It is an approximation, and gets closer and closer, and it works if you 
> start with ANY 2 positive numbers and make a Fibonacci-esque series from 
> them.  You could start with 2 and 417, then 419, 836, 1255, etc, and 
> gradually the ratios of consecutive members of the series start to 
> approach the golden ratio.

This is because defining Newfib(1)-Newfib(0)!=1 just multiplies Fibonacci 
by a constant, which cancels out when taking ratios; and redefining 
Newfib(0) != 0 only shifts it like Newfib(n) = Fib(n+c), though c might be 
fractional (you normally have to use the formula i gave in the previous 
mail to get Fibonacci values on the positive real domain)

> The golden ratio is defined by x=1/x + 1

More usually like x^2 - x - 1 = 0, which is really the same thing.
Note how it looks like Fib(n+2) - Fib(n+1) - Fib(n) = 0 !
You may consider Fib(n+c) = x^c for extra fun.

> when you take, for instance, 13/8, that is 1 + 5/8... or 21/13 is 1 + 
> 8/13... 34/21 is 1 + 13/21, because of the way you obtain each number. 
> Always 1 + the reciprocal of the previous ratio.  So you will never 
> quite reach the golden ratio, but you alternately go slightly higher and 
> slightly lower, getting gradually closer.

BTW, Euclid's way of simplifying fractions (greatest common divisor) is 
slowest with consecutive Fibonacci numbers. Its average and worst running 
times are multiples of log((a+1/a)*n)/log(a), where a is the golden ratio.

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada


More information about the Pd-list mailing list