#### Archived

This topic is now archived and is closed to further replies.

# integer square roots

This topic is 5970 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

do you guys know a fast method to find integer square roots? i mean sqrt(10) = 3. P.S: editing for correcting gammar mistakes [edited by - akiinao on June 10, 2002 5:25:14 PM]

##### Share on other sites
simply do this:

int iResult = (int)sqrt(value);

There is no faster way to get square roots. Thats why you should avoid using them when possible

##### Share on other sites
PUTZ!! what a dumb!
I'm talkin' about algorithms... (that formula i know)

[edited by - akiinao on June 5, 2002 3:52:49 PM]

##### Share on other sites
quote:
Original post by Kern
simply do this:

int iResult = (int)sqrt(value);

There is no faster way to get square roots. Thats why you should avoid using them when possible

dat was se pratty dumb thang to says!

Of coarse there are faster ways of getting integer square roots! And your crazy hungarian notation of iResult makes me want to vomit!

Try http://www.numbertheory.org/calc/krm_calc.html, I think they might have what your looking for!

##### Share on other sites
Sheesh, welcome to the forums, Kern!

You didn''t say you were looking for an algorithm, akiinao.

##### Share on other sites
http://www.azillionmonkeys.com/qed/sqroot.html

##### Share on other sites
Thanks to everyone who provided constructive responses to akiinao''s post.

I admire Richard Feynman, the late physicist who, in his own words, was a "curious character." I''ve read some of his memoirs, and it seems that a few other rather famous scientists (including, I think, Fermi) would always ask Richard questions even when he was a lowly student and they were noble prize-winning famous big-time scientists. Why, you ask? Because Richard didn''t know he was supposed to bow down and worship they ground that they walked on. While their lesser professional peers would generally agree with their theories, Richard would always be honest, telling the big-guys when he thought they were full of shit. They appreciated his honesty! I do imagine that he was fairly courteous to them, though! I guess he probably never called them "dumbass!"

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

##### Share on other sites
quote:
Original post by grhodes_at_work
I guess he probably never called them "dumbass!"

eehehheehe, I can hear it through the sands of time:
"Fermi, you're such a dumbass. I can't believe I hang around with ghey guys like you - like bombarding uranium with inert neurons will make anything special happen, I don't care how fast... OH MY GOD"

Magmai Kai Holmlor

"Oh, like you've never written buggy code" - Lee

[edited by - Magmai Kai Holmlor on June 5, 2002 7:22:30 PM]

##### Share on other sites
I really liked the play about him, Q.E.D., did anyone else see that? Very good play!

Oh, and I diddn''t mean to sound stuck up about integral algorithms, I was saying it in a joking sense. You really think I''d make fun of hungarian notation? .bSen

thanx guys.
;-)

1. 1
2. 2
3. 3
4. 4
Rutin
17
5. 5

• 13
• 14
• 9
• 9
• 9
• ### Forum Statistics

• Total Topics
632927
• Total Posts
3009241
• ### Who's Online (See full list)

There are no registered users currently online

×