Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

880096 Posts in 33019 Topics- by 24386 Members - Latest Member: tu3sday

May 25, 2013, 06:35:03 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)Int or Float
Poll
Question: Search your feelings - you know you have a bias for one of them:
Float - 18 (16.5%)
Int - 58 (53.2%)
Nope, totally, completely unbiased - 33 (30.3%)
Total Voters: 105

Pages: 1 ... 10 11 [12]
Print
Author Topic: Int or Float  (Read 6336 times)
garlandobloom
Level 0
***



View Profile WWW Email
« Reply #165 on: May 04, 2012, 09:57:09 PM »

Hmm... Well apparently I am the idiot in this situation. This topic has me intrigued but also somewhat concerned. I have quite naively been doing comparisons between floating point values without regard for the possibility that the underlying calculations might actually be inaccurate to a significant degree.

So I guess I need to convert all of my comparisons into a form which accounts for some margin of error?

On second thought though, I am not certain if I have any direct equivalence tests, mostly just range tests. But it is good to know it is something I should be aware of in the future. I'm just making a 2d platformer though. Tongue
Logged

rivon
Level 10
*****



View Profile
« Reply #166 on: May 05, 2012, 01:09:28 AM »

Hmm... Well apparently I am the idiot in this situation. This topic has me intrigued but also somewhat concerned. I have quite naively been doing comparisons between floating point values without regard for the possibility that the underlying calculations might actually be inaccurate to a significant degree.

So I guess I need to convert all of my comparisons into a form which accounts for some margin of error?

On second thought though, I am not certain if I have any direct equivalence tests, mostly just range tests. But it is good to know it is something I should be aware of in the future. I'm just making a 2d platformer though. Tongue
Just use something like I wrote few posts above. Only tweak the 0.000001 part Wink
Logged
Pages: 1 ... 10 11 [12]
Print
Jump to:  

Theme orange-lt created by panic