in reply to Yet Another Fair Shuffle Node

Why use floats for the tags? Wouldn't random integers do just as well?

Replies are listed 'Best First'.
Re^2: Yet Another Fair Shuffle Node
by Roy Johnson (Monsignor) on Apr 04, 2005 at 15:03 UTC
    Random floats should have a lower incidence of collision.

    Caution: Contents may have been coded under pressure.
Re^2: Yet Another Fair Shuffle Node
by tlm (Prior) on Apr 04, 2005 at 19:38 UTC

    Random integers would work fine, as long as you draw them from a sufficiently large range. The few PRNGs I have looked at, even when they give you a float in the end, start by doing an integer calculation and then dividing the random int found by the max possible value. So you could just skip that last normalization step, and use the random ints as your tags. I suppose this could make the algorithm marginally faster.

    the lowliest monk