Q: Why do you use random() instead of first 8 bytes of SHA256 of the transaction hash as described in the algorithm?
A: Because SHA256 is designed to generate values that are uniformly distributed.
Q: What happens if a==b? Why don't you process this situation?
A: The original algorithm described in wiki doesn't give the answer either. But the possibility of this event is proportional to (2-64)2 (because 8 first bytes of sha256 have 64 bits) which is about 10-38 so it is safe in this code to simple skip such cases for clarity. If you are feeling pedantic you can add the line
Hehe, why r u affraid of answering my questions?
No, I'm ignoring your attempt to substitute notions (we both remember that you've done it before, and last time you failed to explain how the substituted notion related to my original post).
Start a new thread and I shall answer it there.
I'm not willing to continue this senseless flood any longer. It doesn't help anyone. If you don't believe me or Cryddit ask someone whom you believe. Ask BCNext, ask Jean-Luc.