|
-
Feb 24th, 2000, 03:07 AM
#1
where can we find a routine to calculate the square root of an integer with as many numbers after the coma as we want?
-
Feb 24th, 2000, 03:45 AM
#2
Have you tried the Sqr() Function?
-
Feb 24th, 2000, 03:52 AM
#3
Member
I have a feeling I might have missed something in the question, but if iNumber is some integer then, Sqr(iNumber) will return the square root of iNumber as a double. But VB only displays 15 characters, Sqr of anything <100 will display 14 decimal places, <10000, 13, etc.
If you want to display fewer digits, then do a Format$(Sqr(iNumber),"0.0000") to as many, or few places.
If I missed what your question was asking, I apologize.
--Carl
-
Feb 24th, 2000, 06:38 AM
#4
the sqr function returns a double; I'll never have more than 15 digits in the mantissa;
what if I want a 500 digits mantissa
-
Feb 24th, 2000, 07:43 AM
#5
Hyperactive Member
Ok, maybe I was asleep that day in math class, but I've been taking math for 13 years now and I am currently in 2nd year college calculus and I have never heard of a Mantissa. What is it?
-Ryan
I smell varmint poontang, and the only good varmint poontang is dead varmint poontang...
-Bill Murray, Caddyshack
-
Feb 24th, 2000, 09:46 AM
#6
Hyperactive Member
Mantissa is a green little insect (about a quarter inch) that eats small pebbles.
OR do you refer to the number of decimals of a number?
-
Feb 24th, 2000, 10:20 AM
#7
Hyperactive Member
Rayn!
It is very sad you have slept over.
INTEGRATED MATHEMATICS (text book for hight school}:
"The positive decimal part of common logarithm is called MANTISSA....."
Same for sguare root, I just dont have any textbooks earler grades.
-
Feb 24th, 2000, 10:33 AM
#8
Hyperactive Member
Double returns you more then 15 numbers, but only these15 are pricese (that exactly what means Double)
Single nambers are 7 digits ( single precision).
So in Vb 15 - is all you got. But it still can be calculated in certain way, but will take a hard work.
-
Feb 24th, 2000, 05:58 PM
#9
Frenzied Member
ooer!
Perhaps you need to code The Newton-Raphson method of calculating square roots using VB
Edited by Mark Sreeves on 02-25-2000 at 07:20 AM
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
|