Jump to content
  • Advertisement

Archived

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

Mulligan

really small numbers

This topic is 5801 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

Advertisement
Long is the biggest / smallest you can go. Its 64bits if i''m not mistaken



"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I''m reaching up and reaching out. I''m reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one''s been. We''ll ride the spiral to the end and may just go where no one''s been." - Maynard James Keenan
[TheBlackJester ]
[Wildfire Studios ]

Share this post


Link to post
Share on other sites
quote:
Original post by Mulligan
er, you can't do that.


According to the standard you can. But then again, MSVC isn't totally compliant, if that's what you're basing your assumptions on.

[edited by - zealouselixir on August 30, 2002 12:45:35 AM]

Share this post


Link to post
Share on other sites
I think that float should be able to handle it, but if float doesn''t work try double . Thats in c++. In VB, I''m not sure, I believe the types are something like single and double .

Share this post


Link to post
Share on other sites
Floating point numbers only have precision loss on VERY little numbers - your one isn't very little

66.7f is as good as 0.00000000006670f
that's why it's called floating point...
even that number is nice for a float and won't have badder precision than the above:
0.000000000000000000000000000000000000006670f

Don't use "long double"! They are 80-bit numbers and the FPU can't handle loading them from memory in a calculation, so the compiler must add a load instruction before every one. "double" should be enough for everything, and even float is good enough for most things. "float" is also much faster.


[edited by - noVum on August 31, 2002 1:01:44 AM]

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!