Re: 63/64 bit version of Delphi's function random( aRange : integer ) : integer; ?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


sci.crypt archive

Re: 63/64 bit version of Delphi's function random( aRange : integer ) : integer; ?

From: Skybuck Flying <spam@hotmail.com>
Date: Fri Apr 28 2006 - 15:11:33 CEST

Oh...

I forgot something about the random function and so did you...

Now comes the most interesting part of all.

Remember this line:

0 <= x < range.

The random function always returns a number ranging from 0 to range-1.

This means random($FFFFFFFF) will return a maximum value of $FFFFFFFF-1.

So combining two random values obtained with two seperate random calls and
then stitching them together like your random64 function does is happily
enough a flaw function, which puts a big smile on my face =D

This simply means that your random64 function will be missing the following
return value: $00000000FFFFFFFF

This is a perfectly valid return value but your random64 function will never
ever returned it if I am not mistaken ;)

The other return value that will never be returned is $FFFFFFFFFFFFFFFF but
that's perfectly legal/normal see above ;)

So finally after many research and using my super duper truper computer
(yessss Skybuck's Dream PC) I think I have proven that your random64
function is flawed !

Join the club dude. The club of fucking losers, the club of fucking flawed
code writers lol. The other dude is already in it ;)

Nice try though ;) definetly learned some stuff from it..

Maybe you could even learn me some more stuff.. how to optimize my bit
operations... but unfortunately I am not willing to share my pathetic slow
code... but very cool flexible/powerfull code.

How pathetic is that ?!?

Man I could safe myself assloads of time sharing it... because maybe you can
optimize it.. in the blink of an eye.

But I definetly dont wanna share... it's just a few lines of code.. but
still nonononononono I am such a bad motherfucker... for not sharing it.
It's fucking unbelievable ;) but that's the way it's gonna be =|

Bye,
  Skybuck ;)
Received on Mon May 1 02:05:40 2006