pouët.net

Go to bottom

Integer VS Fpu

category: general [glöplog]
So. if you are trying to do a pineapple mix with apples and oranges.. What is better? Lemons or carrots?
added on the 2009-03-30 03:32:10 by Hatikvah Hatikvah
Well. That's really a hard one i have to admit. on one side the lemon juice is something i really love, and on the other side carrots are really sweet. life is hard, i mean.
added on the 2009-03-30 03:33:59 by nystep nystep
I'd say 13, maybe 14. Depends on the weather, of course.
added on the 2009-03-30 17:16:49 by xTr1m xTr1m
when it floats, it's a witch... now that was easy.
added on the 2009-03-30 17:25:48 by raer raer
wow! someone revived this pointless thread! what a great chance to add my shit!

i really hate it when i see code that switches all the time between int and float because the coder is just too lasy or stupid to figure out what he wants. usually the decision is not about perfomance, but about context. you will get weird bugs if you count "pieces of gold" in float or measure velocity in integer. rounding errors are hell. this is real world stuff: a racing game were the total time is not equal to the sum of the lap times, and every table displays a slightly different time. because someone didn't knew how to round correctly. and then there are people who switch between int and float every two lines of code, that makes me really mad. oh, sorry, rant loop...
added on the 2009-03-30 20:52:07 by chaos chaos
Hahahaha.. Chaos, I almost forgot that one...

Btw - needing three attempts in writing a sorting-algo to sort the rank in a race-game is unforgettable as well. (I know who you are :-)

added on the 2009-03-30 23:02:42 by torus torus
bcd is the right thing...
added on the 2009-03-31 06:15:01 by iq iq
bcd is too easy. coding three digits in 10 bits is fairly optimal.
dcb is more challenging. if you want to do it as well you have to stuff 53 bits in 16 digits.
added on the 2009-03-31 10:02:15 by 216 216
iq: for display, yes. not for precision though: with radix 2 floating point you get the best relative precision (higher radixes have more "wobble") and the implicit 1 bit as a bonus.
added on the 2009-03-31 17:02:54 by ryg ryg
I was kidding of course with the bcd comment.

216: I have a better one, 59 digits in 196 bits. But that starts to be a bit too big. The [3,10] is very reasonable though.

added on the 2009-03-31 21:32:34 by iq iq

login

Go to top