|
-
January 28th, 2000, 05:16 PM
#1
tough VB question - see if you can answer it!
It took me a while to get it, and lots of frustation, but I eventually got it... Here is the question:
I want any one of you to write code that will solve the equation a ^ x = b for x, if the values of a and b are given. The hard part to it? You can't use any LOG () or EXP () functions. For that matter, the only mathematical function you can use is addition/subtraction, multiplication/division, and ^.
So far nobody I asked in my neighborhood has gotten it...Usually is is just:
public Sub Exponent (a as double, b as double)
x = log (b) / log (a)
End sub
I want you to do it without log () functions or exp () functions... Or any built in VB math function besides +/-, *//, ^.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|