Code center > Bugs and fixes

Found pretty serious Integer stack bug

<< < (2/2)

Numsgil:
Usually if there's any problem with fractions, you can just multiply everything by 100 or 1000, do your calculations, and then divide by 100 or 1000.  Sort of a manual floating point.

If we go this way, I think we should find a way to do fixed point.  Hard limit the number of decimals to 3 or 4.  If you thought your example was unintuitive, imagine someone banging their head against a wall because of floating point inaccuracies.  That was one nice thing about integers.  You could do an "a = b" test.  You can't really do that with floating point numbers.

So I dunno.  On the one hand, floating point numbers are a whole can of worms I'm not sure we want to open.  On the other, it eliminates problems with integer truncation.

googlyeyesultra:
I'd recommend re-rerunning all of leagues under it without the spiffy speed features and see if any of the bots aren't able to operate.

Oh, and you should never leave calculations of constants to a program. Get out your calculator and do it, and reduce that to .2.

EricL:
I'm going to back this out for now.  There are implications in things like bitwise operators and such that I just don't want to have to test or explore.

Jez:

--- Quote from: googlyeyesultra ---I'd recommend re-rerunning all of leagues under it without the spiffy speed features and see if any of the bots aren't able to operate.
--- End quote ---
I've tried that, causes problems.

I now stick by the tried and tested 'It can cheat to get a place in the league and if that cheat is fixed the bot keeps its place!'

Navigation

[0] Message Index

[*] Previous page

Go to full version