Post
Topic
Board Micro Earnings
Re: Win free Bitcoins every hour!
by
Aquilo
on 30/06/2014, 02:48:28 UTC
I am sorry, it should be "rounded off" and not "rounded up". I shall correct this on the website. So any number below 0.5 will be rounded down to 0.

OH... I changed my test script from ceil() to round()...

With ceil()
[Counts out of 20000 tries]
Jackpots: 1
10000 prize: 3
0000-9885: 19766
9886-9985: 202
9986-9993: 15
9994-9997: 13
9998-9999: 2

With round()
[Counts out of 20000 tries]
Jackpots: 4
10000 prize: 1
0000-9885: 19788
9886-9985: 191
9986-9993: 9
9994-9997: 8
9998-9999: 4

round 2,3,4,5...
[Counts out of 20000 tries]
Jackpots: 1
10000 prize: 0
0000-9885: 19765
9886-9985: 201
9986-9993: 23
9994-9997: 7
9998-9999: 5

round 6...
[Counts out of 20000 tries]
Jackpots: 4
10000 prize: 1
0000-9885: 19793
9886-9985: 184
9986-9993: 14
9994-9997: 4
9998-9999: 5

it's a lot harder to hit 10,000 using round instead of ceil but it's still possible! it took 120,000 rolls before it came up again, but it does!

Code:
set_time_limit(360); // number of seconds to run script, default is 30

$_jackpot $_10k_pz $_prize1 $_prize2 $_prize3 $_prize4 $_prize5 $_lo $_hi 0;
$tries 20000//Number of tires
$c=0;// Iteration count
do {
// nonce = $c;
// 12 char server seed string, 16 char client seed string
$nhash hash_hmac('sha512',$c.':'.seed_string(12).':'.$c,$c.':'.seed_string(16).':'.$c,false);
$_no round(hexdec(mb_substr($nhash0))/429496.7295); // Changed from ceil() to round()

$_jackpot += ($_no == 8888);
$_10k_pz += ($_no == 10000);
$_prize1 += ($_no >= && $_no <= 9885);
$_prize2 += ($_no >= 9886 && $_no <= 9985);
$_prize3 += ($_no >= 9986 && $_no <= 9993);
$_prize4 += ($_no >= 9994 && $_no <= 9997);
$_prize5 += ($_no >= 9998 && $_no <= 9999);

$c++;
} while (
$c <= $tries);
echo 
'

[Counts out of '$tries' tries]
Jackpots: '
$_jackpot'
10000 prize: '
$_10k_pz'
0000-9885: '
$_prize1'
9886-9985: '
$_prize2'
9986-9993: '
$_prize3'
9994-9997: '
$_prize4'
9998-9999: '
$_prize5'
'
;

function 
make_rand($l,$h) {
mt_srand(make_seed());
return mt_rand($l,$h);
}
function 
make_seed() {
list($usec,$sec) = explode(' 'microtime());
return (float) $sec + ((float) $usec 65536);
}
function 
seed_string ($itr) {
$charSet str_shuffle('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789');
$ranStr null;

for ($i 0$i $itr$i++) {
mt_srand(make_seed());
$ranStr[] = substr($charSetmt_rand(0strlen($charSet)), 1);
}
return implode($ranStr,'');
}
?>

it's still free bitcoins and dogecoins! so no complaints from me! lol