
September 22nd, 2004, 02:06 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
|
|
Re: OT: Interesting math problem...
Quote:
Will said:
Narf, the equation means you take the constant e (2.71828183...) to the power of one half times the natural logarithm of x, or log base e of x. It doesn't have to be e though, you can get away with something like 10. So, 10^(0.5 * log(x)). It works because of the laws of logarithms, since a^b=c is equivalent to log(a)(c)=b. Then, it is simple to reconstruct as a^(log(a)(c))=c. Square root is simply a number to the one half power, so 10^(0.5 * log(x)) is the sqrt(x).
Either way, you're left with pretty much imprecise methods. I remember they briefly showed how to do it in high school, and that's probably an algorithm like the one Fyron pointed to, and it would be written in an equation as the Riemann sum of varying powers of 10, which would be a very nasty looking thing. Jack's method is easier to write, so I would go with that one. To write it in terms of an equation for square root, it would be something like:
lim(x->∞ R(x,N) = sqrt(N)
--edit: ^ that up there is supposed to be the infinity symbol.
|
Ok, sure. I'll pretend I understand all of that, and you can have a nice, shiney medal.
/me gives Will a nice, shiney medal.
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
|