# Mathematics Problem ??

How can I do this mathematics problem using VB ??

Let say 2 power of 3 is 8.
Q1) 2* = 8     ## where * equal 3

And now using the Q1, I want to find the * by given the other two values(2,8),
How to do this using VB??
###### Who is Participating?

progCommented:
Private Function Star(x As Double, y As Double) As Double

Star = Log(y) / Log(x)

End Function

Private Sub Command1_Click()

MsgBox Star(2, 8)

End Sub

0

progCommented:
Oh yes another thing. How does this work?

y
X  = Z

taking logs of both sides (any base 10 or natural it doesn't matter which, as long as U use the same for each)

y * log(X) = Log(Z)

y = Log(Z)/Log(X)

QED
0

progCommented:
U posted this twice. If U want U'r points back send a question to Linda in the Customer Services dept.  She'll delete the duplicate and refund your points, if you ask nicely.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.