Square root computation can be tricky, often relying on approximations. These approximations tend to perform best for mid-range values, while accuracy can degrade for very large or very small values. With this in mind, a product of roots is generally more accurate than a root of products.
From a SIMD perspective, it’s worth noting that on most platforms, the cost of computing one square root or two is the same. On modern x86 server CPUs, for instance, you can calculate up to 8 double-precision roots in parallel with identical latency. So there’s no additional cost in terms of performance.
I hope this sheds some light on the design of my code.
PS: In a previous life, I did research in Astro- and Plasma Physics. While I don’t claim to remember all the Math, it’s usually more productive to ask for clarification than to assume ignorance ;)
Moments like that are enlightening. When you see something really improbable (knowing advanced SIMD while appearing to ignore basic algebra), it's likely the moment you see a gap in your picture of the world. So it's tine to learn something new and likely unexpected (else you could have guessed).
aka Sinclair ZX81. There was such a program in Your Computer that would toggle between fast and slow mode to generate tones. It was a actually a trivial 8 or 16 step tracker, so you could even make beats...
One cannot assume that an alien can think in a fashion similar to Earth animals.
Humans have the ability to imagine a possibility for which no supporting evidence currently exists--that species alien to our solar system might exist. That ability might not be shared by the species we can imagine. That is, humans can imagine a species that cannot imagine humans. Such aliens would not even realize that building a planet-sized object that cannot be explained by natural processes might present an existential risk.
We, of course, are afraid of hypervelocity impact weaponry, even while having no evidence whatsoever that any such weapon exists anywhere in the universe.
Of course, that just means that any species that did fear annihilation by near-c rocks smashing into their planet would simply disguise their star shade so well that we could not detect it. Meaning that any solar shade we can detect was not likely built by any species able to think like us.
Therefore, instead of hiding, the aliens are going to pro-actively fry every competitor civilization by using their solar shades as a Nicoll Dyson Beam... :-)
Isn't that just "rm -rv *"? The original spec was to only delete files, not directories - and only those matching a given pattern, at that.
Also, I think yours would go into an infinite spin if it met a symlink loop (say, "ln -s . foo") - File::Find is hardened against that kinda shenanigans.