Chris Lomont, a physicist and programmer, writes technical papers on numerical methods, math in everyday devices, and software oddities.
HN commenters point to his paper on the fast inverse square root as the best explanation of the magic constant 0x5f3759df and its history.
>>time dialation (something completely alien to all before him
>Hendrik Lorentz prop
Lorentz did not think that time actually dilated; his notion of "local time" he considered purely a mathematical trick, unrelated to actual physics, in the same manner that renormalization sweeps away infinities in a clever manner.
Here's the quote: "While for Lorentz length contraction was a real physical effect, he considered the time transformation only as a heuristic working hypothesis and a mathematical stipulation to simplify the calculation from the resting to a "fictitious" moving system. " [1]
So no, Lorentz absolutely did not think physical time actually dilated. Stop repeating this nonsense.
Also, Lorentz was not the first to publish the time dilation formula. And, like Lorentz, all before him thought it a neat mathematical trick, devoid of actual physics.
Poincare did think it may be actual time dilation, but he too lacked the insights that Einstein had that put these dilation and stretching concepts not as ad-hoc after effects, but that they come from a simple, single physical principle. What's more, Einstein's way of looking at it all was the one that turned out to match reality the best.
For example, in 1905 Poincare introduced "Poincare stresses", another fictitious set of forces, to reconcile the math they didn't like from what they thought of as reality.
Lorentz and Poincare used the now-disproven aether as the basis for their theories. Einstein did not.
Spend a…
Hey, you finally made the leap to HN! Did you independently discover a lot of these things yourself or did you come across parts in books/papers? For me the canonical example of deriving magic numbers is with the fast inverse square root trick (my favorite paper on it is http://www.lomont.org/Math/Papers/2003/InvSqrt.pdf ) but I haven't seen many other instances... I haven't gone nearly far enough yet but I like getting pointed suggestions.
There were some recent submissions here about related topics like space-filling curves and secret sharing that I've looked at before. When I started looking into abstract algebra and came across finite fields I sort of laughed at the Wikipedia page mentioning right at the beginning "Finite fields are important in number theory, algebraic geometry, Galois theory, cryptography, coding theory and Quantum error correction" with each topic being linked. It's a fun way to procrastinate.
If your engine isn't part of some secret sauce I think it would be neat to study it. Unless you know of an already existing open source equivalent that's not hidden away in the corners of something like GCC?
Want to know the best part? Nearly all of those signature sounds were generated algorithmically by the processor on the sound board.
The main program would feed some values into a series of feedback loops and shifts to generate the waves before pushing them out the DAC. Game programmers would just play around with various vectors until they found something that sounded interesting.
The whole shebang ran in 2KiB of ROM firmware and 128 bytes of RAM. At 894 kilohertz.
This dude reverse engineered the 6802 code and translated it to C#. Pretty amazing:
http://www.lomont.org/Software/Misc/Robotron/
Next time on our show we'll talk about the magic of palette cycling. Jarvis still uses this on his games to this very day. Kind of his signature now, right?
I first saw the code in the early 2000's and although I figured out the newton-rapshon part I couldn't wrap my head around the magic number, until I read chris Lomont's famous paper[1]. A little gem which reminds us that not that long ago computing resources were a limited commodity.
Abundance is great and speeds up development time, but unfortunately it leads to laziness and bloat
[1] http://www.lomont.org/Math/Papers/2003/InvSqrt.pdf
Also see:
http://en.wikipedia.org/wiki/Fast_inverse_square_root
And for more analysis and improvements see those papers:
http://www.lomont.org/Math/Papers/2003/InvSqrt.pdf
http://www.daxia.com/bibis/upload/406Fast_Inverse_Square_Root.pdf
http://www.geometrictools.com/Documentation/FastInverseSqrt.pdf
Here is a nice white paper about a previous Excel 2007 bug, where a calculation that should result in 65535 is displayed as 100,000. The author concludes that since the patch only alters a few lines of assembly, that it was hand-coded.
http://lomont.org/papers/2007/excel-2007-bug/Excel2007Bug.pdf