I have a formula that I need to re-arrange and I can re-arrange formulae, as long as it's not impossible to like the one I have. I don't mean impossible as in hard, I mean impossible as in I puzzled over it for a couple of days and the went to my maths teacher who has a PHd and she couldn't do it.
Therefore I wrote a script that will try the value 1.00001 and if that doesn't work try the number 1.0002 etc. etc., is there a better way?
The formula is:
a = x * ( r^(n+1) - r )
(-------------------)
( r^(n+1) - r^(n) )
x = ( a * r^(n) * (r-1) )
(--------------------)
( r^(n+1) - r )
n = ( log( x * r ) )
( (------------------) )
( ( (r * (x-a)) + a ) )
( )
(--------------------------------------------)
( )
( log(i) )
All of the above formulae are actually all the same and I need to either find some magical way of re-arranging them or find a better way of trying many different values for r until finally the equation works.
Therefore I wrote a script that will try the value 1.00001 and if that doesn't work try the number 1.0002 etc. etc., is there a better way?
The formula is:
a = x * ( r^(n+1) - r )
(-------------------)
( r^(n+1) - r^(n) )
x = ( a * r^(n) * (r-1) )
(--------------------)
( r^(n+1) - r )
n = ( log( x * r ) )
( (------------------) )
( ( (r * (x-a)) + a ) )
( )
(--------------------------------------------)
( )
( log(i) )
All of the above formulae are actually all the same and I need to either find some magical way of re-arranging them or find a better way of trying many different values for r until finally the equation works.