Skip to main content
gamedev.net
🔒 Locked

Large Integers Problem...

Started by Synex Oct 14, 2003 at 8:39 AM 3 replies 450+ views
Original Post
Synex
Synex
Hi there... Let me explain my situation and then my question so you can (hopefully) understand. I''ve managed to export a galaxy map from a game into an Access db. The galaxy map consists of stars with coords in doubles - numbers ranging from -5.08743946216136E+33 to 3.36522971264518E+33 with middle values of about -1.49878399698404E+14 My problems comes with this... So far, I''ve been dividing these HUGE numbers by 1E+30, to get them all down to between +/- 10000.0. However this causes a problem with the numbers that are only E+14, as they loose all form of accuracy they ever had and all tend to round down to 0.0, meaning that I have many ''stars'' on my map lying along the 0.0 x,y,z boundaries... If anyone understands my problem please post and gimme a hand!!! Cheers, Chris
SynexCode Monkey
clum
clum
What''s the problem? Is that not what you expected to happen? What do you want to happen? If you want to get it more evenly spaced, then you can, perhaps divide it by a logorithmic scale, though I don''t know why you''d want to do that.
Zorx (a Puzzle Bobble clone)Discontinuity (an animation system for POV-Ray)
Synex
Synex
For the most part, it works well, as most of the numbers just shrink... However, most of the numbers in the E+25 to E+15 range get way way to small and just round down to 0.0 and sit exactly on the axis...

Any recommendations as to how to get around this problem? Can I setup an OpenGL app to show things that are +/- 1E+33 ?
SynexCode Monkey
clum
clum
If you use doubles to store your values, it shouldn''t round.
Zorx (a Puzzle Bobble clone)Discontinuity (an animation system for POV-Ray)
Synex
Synex
Ok, I''ll give it a go - I think I''m using floats at the moment - cheers!
SynexCode Monkey

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.