Oh, lol!
I did not know DarkBASIC Pro had the Square Roots of things(should have known that)
Thanks!
And if any of you want some thing realy hard to do... Try finding the square root of a Number using
"How about the Binomial Theorem, which says:
(x+y)^n = x^n + nx^(n-1)y + n(n-1)y^2/2! + n(n-1)(n-2)y^3/3! ...
If we make x=1 and n=1/2 (square root), we get:
(1+y)^(1/2) = 1 + y/2 - y^2/4(2!) + 3y^3/8(3!) - 3(5)y^4/16(4!) + 3(5)(7)y^5/32(5!) ...
If we want to find the square root of some number z, then z=1+y, which means that y=z-1. But we find that y must be in the range -1<y<1, so 0<z<2, this series only works when z is between 0 and 2, not inclusive. We could use another series for z>=2. Let's find the series for (1+y)^(-1/2):
(1/(1+y))^(1/2) = 1 - y/2 + 3y^2/4(2!) + 3(5)y^3/8(3!) - 3(5)(7)y^4/16(4!) ...
Here, you can use z=(1/(1+y)), which makes y=1/z-1. And again -1<y<1, which makes z>1/2. So, with this series, we can find the square root of anything greater than 1/2. Actually, it's slow for z>10.
--------------------------------------------------------------------------------
Note: y^2 means y squared. y^(1/2) is the square root of y. I could have tidied up the equations with superscipts. But the equations would be messy anyway, in HTML. So, please forgive me for the notation."
Some long math formula... For what purpose, I know not, just for the chalenge try to make it into a code in DarkBASIC. That would be pretty cool.
Thanks for all the help! Now I can try to make a caculater!
But It would be nice if I could see a code using a more mathamaticle way of doing it then using one command.
Thanks!
Do Print "Hello World"
Wait 2003 loop