Hallo leute,
ich bin auf der suche nach einer formel mit der es sich einfach berechnen lässt wie oft ich x verdoppeln kann bis y rauskommt.
beispiel:
x= 10
y= 15.000
10+(10*2) 20+ (20*2) 40+ (40*2) 80 .....
Guten Abend !
ich bin auf der suche nach einer formel mit der es sich einfach berechnen lässt wie oft ich x verdoppeln kann bis y rauskommt.
Anfangszahl x Endzahl y Anzahl der Verdoppelungen n
\(x*2^n=y\)
\(2^n=y:x\) \(n*log(2)=log(y)-log(x)\)
\(n=\frac{log(y)-log(x)}{log(2)}\) Dies ist die gesuchte Formel !
Beispiel: x =10 y = 15000 n = (log(15000)-log(10))/log(2) = 10.5507467853832423
Probe: 10*2^10.55074678538 = 14999.999999966279516
Gruß radix !
Zur Bestätigung noch ein Beispiel : 3 - 6 - 12 - 24 - 48 ( 4 Verdoppelungen !)
(log(48/3)/log(2) = 4