|
-
Sep 13th, 2000, 09:02 PM
#1
Thread Starter
Frenzied Member
How do I get square roots in vb?!!!! I've have been trying all day but can't find an equation! Please help. Thanks guys!
-
Sep 13th, 2000, 09:06 PM
#2
Sqr(number)
where "number" is the number you want the square root of.
This is how I do it using VB6
-
Sep 13th, 2000, 09:08 PM
#3
Thread Starter
Frenzied Member
-
Sep 13th, 2000, 11:20 PM
#4
Hyperactive Member
Or how about
If you ever find there is no sqrt function in some language you are using, just remember your Math from school.
To use logarithms, use
Code:
sqrt = exp(log(x)/2)
only this is less accurate than the first example.
hehe
This way you will know how to work out the nth root of any number in code...
Regards
Paul Lewis
-
Sep 15th, 2000, 06:47 AM
#5
Conquistador
hey steve, namezero has done something to ur web site
-
Sep 15th, 2000, 11:11 PM
#6
Thread Starter
Frenzied Member
Uh Oh! Damn namezero! Well my new homepage is this: http://www.geocities.com/stephenmack23/index.html
thanks da_silvey!
sqrt = x ^ (1/2)
oh boy...a kid reccomended that but i heard wrong and tried squrt = x ^ -2
Thanks so much guys! (we are in ch 4 in school, square roots was hidden in ch 8)
-
Sep 16th, 2000, 12:58 AM
#7
Monday Morning Lunatic
What book? (Oh yeah - age/grade?)
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Sep 16th, 2000, 09:26 AM
#8
Thread Starter
Frenzied Member
Im a freshman in high school, Im 14 The books name is.....drumroll.....An Introduction to Programming Using Microsoft Visual Basic Versions 5 & 6 . It sounds very basic but it goes from how to use windows to databases and stuff. Good book
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
|