Forgot your password?
typodupeerror
Space

SpaceX Falcon Update With Pictures 30

Toren Altair writes "SpaceX made good progress with their Falcon 9 rocket. Check the progress with pictures. 'Today we fitted the F9 skirt to the fuel tank end of the 1st stage. Also had movement on the erector, with the upper aluminum truss just coming back from being painted. Activity on the floor is constant and will remain so throughout the week and weekend as we prepare the F9 structures for shipping to Texas for testing before they head to the Cape.'"

Comment Re:Shuffling and randomness (Score 1) 524

Your example does NOT produce a more random distribution.
So I guess you fail too :)
Any random number generator that uses % (mod) will not work.
Here is a simple proof:
Take a piece of wood, 10 inches long.
Using a saw, cut it into 3 inch lenghts.
Stack all 4 pieces on top of each other.
What you get is that 3 of the parts stack perfectly, but you have on left over little bit of 1 inch, that makes part of the stack higher.
Now imagine a number line of ten numbers being this bit of wood. The numbers chosen are from one to three (the mod 3 part), thus the 3 inch cuts (each inch is one integer).
You should beable to see the the number 1 has 4 chances, and the number 2 and 3 has only 3 with a number generator that generated numbers from 1 to 10.

So, thus you must ALWAYS scale the random() results, not use mod. so (random() * (max desired + 1)) / (max value returned by random + 1) or something close to that.

Slashdot Top Deals

Repel them. Repel them. Induce them to relinquish the spheroid. - Indiana University fans' chant for their perennially bad football team

Working...