![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
sci.crypt archiveRe: 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
This simply means that your random64 function will be missing the following
This is a perfectly valid return value but your random64 function will never
The other return value that will never be returned is $FFFFFFFFFFFFFFFF but
So finally after many research and using my super duper truper computer
Join the club dude. The club of fucking losers, the club of fucking flawed
Nice try though ;) definetly learned some stuff from it..
Maybe you could even learn me some more stuff.. how to optimize my bit
How pathetic is that ?!?
Man I could safe myself assloads of time sharing it... because maybe you can
But I definetly dont wanna share... it's just a few lines of code.. but
Bye,
|