Nearest power of 2

Started by
134 comments, last by SiCrane 19 years, 9 months ago
Quote:Original post by Thomas_CR
I am sorry, but as you see, DD3 has a FLAW. Doesn't work well.


Actually you're a moron, if you read the thread you see that the issue about 0 has been talked about and that DD3 was changed to reflect the general consensus that was reached, that nextpow(0) should equal 0. If you really want 1 there just change the first entry in the LUT.

Quote:Original post by Thomas_CR
Critticall's and BSR4 are the only two in the game. Sorry folks!


Criticall was never in the game if you ask most people...
HardDrop - hard link shell extension."Tread softly because you tread on my dreams" - Yeats
Advertisement
I don't ask most people. I ask those who understand what the next power of 2 is.

Sorry, mend your DD3 yourself. Maybe a hybrid will run this time properly. It could be the fastest way "again".


@Thomas_CR Ok, listen to reason (although you haven't do so anywhere else):

If in ANYTHING you're the only one out of dozens of people who gets a different answer that usually means that you're wrong. I didn't want to get involved in this, but you're arrogance and the fact that you just don't listen to anyone has gotten me convinced to try and force you to listen to at least someone. If you can't understand that your algorithm isn't the fastest over the given test area in a real life situation (eg a game in RELEASE MODE obviously) then maybe you're not cut out to do this sort of thing. If you can't accept defeat, then go back to kindergarden and get taught some humility.

Besides, I know the real reason you haven't shown any benchmarks, it's because you did do them, but they showed that yours was slower. You don't want to be proven wrong, so you don't mention them and keep insisting that your method is faster.

If I were to use a method, I'd use DD3, because it's simple, and efficient. It doesn't use loads of if statements, and look up tables have always been used for optimization (try to load HQ background on a GBA without them).

So just give up now, before you further embarass yourself. You've already ruined all of your credibility, and now no one will ever want to hear what you have to say.

Good job, way to raise the bar.

EDIT: BTW, nextpow2(0) should equal 0. Anyone who's taken grade 11 math should know this. 2^0 = 1, 2^-1 = 1/2 ... 2^-inf = 0

It's just that simple!
She walked into my office like a centipede with 98 missing legs.
Quote:Original post by Thomas_CR
I don't ask most people. I ask those who understand what the next power of 2 is.

Sorry, mend your DD3 yourself. Maybe a hybrid will run this time properly. It could be the fastest way "again".


In order to mend something it has to be broken, DD3 isn't broken it works exactly like specified that is it gives the same results as the "logical" version. Sure you could argue that the specification is wrong but the customer is always right you know. If they order something broken you better not tell them that it's wrong, and you really can't dismiss the competition by saying "my solution is mathematicly superior their compilers are crazy so don't mind that it takes twice as long covers a smaller range and doesn't scale" the LUT doesn't make an assumption about the distribution it's generall over the whole supported range.
HardDrop - hard link shell extension."Tread softly because you tread on my dreams" - Yeats
http://mathworld.wolfram.com/Power.html

Check what the power is. Both of you. And mend the DD3 accordingly.
That's enough. Closed.

This topic is closed to new replies.

Advertisement