Become a fan of Slashdot on Facebook


Forgot your password?

Comment Re:Ray tracing in Java (Score 1) 258

How often do you need to do unsigned integer division? I've been programming for 20 years without once wanting it.

I have a somewhat obscure usage for you that you might not have thought of.

You can perform optimizations when using products of prime numbers (you can fit more in an unsigned number). For instance, to test if a number is missing from a given set, just see if the remainder is zero. Where this may be useful instead of just using bit operations (and where division comes in) is when you may have the same prime multiplied more than once. You can then check the remainder, if zero, do an unsigned divide of the original product and then check the remainder again (rinse & repeat).

Again, not likely to come up often. But this maybe useful in scenarios where many rows of numbers with some unknowns have to be optimized for space and/or you would like to omit some slower to process 'if' statements.

Comment Re:godelstheorem? (Score 1) 209

Turing machines that aren't allowed to have infinite tapes are called finite state machines. FSMs are worthlessly boring. Turing machines are interesting because of the possibility of infinite state.

I put it to you that one could just as easily say that Turing machines are worthless (except to mathematicians) because they cannot be expressed by a real, physical application and set circumstances where it is impossible to make some otherwise useful programs.

I am not whingeing about anything other than that these things were not discussed properly in the CS lectures I attended. Maybe these things should be left to mathematicians or for later on, as one of the earlier posts suggests.

I just wanted to present some food for thought to those who may not have their heads around this stuff yet as well as the put forward the idea of checking as the code is being written (something I have yet to see an IDE do well and has the potential to produce faster code). In the process I may have inadvertently angered those such as yourself.

PS - I do have a lot of time for people studying pure mathematics. Just make sure that people understand that where infinities are involved, you cannot apply a theory to the real world (black holes notwithstanding).

Slashdot Top Deals

"my terminal is a lethal teaspoon." -- Patricia O Tuama