Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Weird Float Fractions During Prototyping [DBPro 7.7]

Author
Message
WickedVixen
19
Years of Service
User Offline
Joined: 28th Mar 2007
Location: New Brisbane, Utopia Prime, VGC GHQ
Posted: 22nd Mar 2012 18:20
I have been prototyping some FLOAT stuff for an MMO game that I'm trying to figure out.

It seems that no matter how I try to define these FLOAT variables, I get some odd-looking micro-fractions. Stuff like this:


Even when I use a #CONSTANT form to define the variable, I still get the micro-fractions. None of my calculations therefore work correctly and my prototyping is now up in the air...

Any suggestions? Any workarounds?

Also, on an aside, is there a HUGE INTEGERS plug-in for DBPro? I used one for Think Pascal 4.5d1 on my Mac Quadra 610s, though it was written for Think. I cannot find one though for DBPro (a base256 Massive Integer system). This method would allow me to use a 10-digit base256 Huge Int and allow for a VERY LARGE SCORING SYSTEM! LOL

There's a thin line between Genius and Insanity.
Which side are you on? (Or is it more likely that you're balancing precariously on that line and struggling not to fall one way or the other?)
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 22nd Mar 2012 19:57
STYX?

Benjamin
23
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 22nd Mar 2012 20:27
It's just the way computers handle floats, you can't really avoid it. Try a thread title search for 'float', it's been discussed quite a lot here.



Support a charitable indie game project!

Login to post a reply

Server time is: 2026-07-09 21:19:55
Your offset time is: 2026-07-09 21:19:55