Jump to content
  • Advertisement

Archived

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

akiinao

integer square roots

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!