MS Office on Linux 14772
Here are at least three one-pbutt versions:
The problem with the algorithm you just described is that you have to have the mean to generate the differences. So your method requires a pbutt through the data to generate the mean, and then a pbutt through the data to generate the standard deviation. The three algorithms described above *don't* require precalculating the mean, and thus can generate the result with one pbutt through the data. Clearly, you didn't know about them.
(But I guess this isn't "really different", right? "No *true* Scotsman...")
MS Office on Linux 14773
Ah, I was waiting for that! The point is that for a real program of any size, and even for many trivial functions, the odds of two people hitting on an...
And this is why clean room design, even for very rigidly-specified items, never ends up looking exactly like what it's cloning.
I've done things similar to what you're talking about. For an old program I did called Minev I used an algorithm I learned from "Numerical Recipes in C" called a Bays-Durham shuffle table. But I didn't cut and paste the code, I made sure I understood it, then reimplemented it from scratch. I didn't just rename some variables and slap it in.
Ray Ingles (313) 227-2317
"Suffering is good for the soul, but it is usually best to wait until the body has no choice in the matter." - Stephen Donaldson