Possible? - Gather/Less than with an unknown variable

• November 19th 2012, 05:07 AM
spil778
Possible? - Gather/Less than with an unknown variable
Kai I was thinking if you possible could get the, closest to the number with a formal or something. The problem is:
2^x<Y
Y can for the matter be any number we can in this example use 1000 so it named
2^x<1000
How can you find what maxium for "x" is?
Or is that out of the mathematic and thefore only way is to guessing (Thats what my math teacher says)

Regards Nicki (:
• November 19th 2012, 06:03 AM
emakarov
Re: Possible? - Gather/Less than with an unknown variable
The largest integer x such that $2^x\le y$ is $\lfloor\log_2 y\rfloor$ where $\log_2$ is logarithm to the base 2 and $\lfloor\cdot\rfloor$ is the floor function.