>Hi guys
>
>help me out
>
>if 2^x = y, then x = ?
>
>thank you
2^x = y
Taking logs on both sides (I will use natural logarithms, but any base will do):
ln 2^x = ln y
The left side can be changed, using standard properties of logarithms:
x ln 2 = ln y
Now, you only require the most basic algebra to change this to:
x = ln y / ln 2
In VFP:
x = log(y) / log(2)
HTH, Hilmar.
BTH, I suggest to use more meaningful titles.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)