Better HN
topnewbestaskshowjobs
Log inSign up

esnard

1,603 karma · joined Jul 24, 2015 (11y ago) · 214 submissions

[ my public key: https://keybase.io/esnard; my proof: https://keybase.io/esnard/sigs/0E5vBuRx9Upe6svfSCYGsOtVz029bQNaogdbCfnuK-M ]
Submissions

comment 11y ago · link · parent

English translation for people who don't understand French:

"If you give me six lines written by the hand of the most honest of men, I will find something in them which will hang him."

comment 11y ago · link · parent

"Good afternoon, I'm very happy that you've sent a solution to our very good enigma we've published last week, our review team analyzed it and they would like you to stop contacting us with your miscellany of formulas, so thanks a lot for your interest but please understand we'll call the police if you backslide.:-)"

98/100

comment 11y ago · link · parent

They actually have a wall of fame: http://stackexchange.com/about/security

comment 11y ago · link · parent

Actually the modulus needs to divide the number of possible output of rand(), which is by definition (MAX_RAND - MIN_RAND + 1), if you want to have a uniform distribution (assuming your rand function has a uniform distribution).

In the specific case of mt_rand, MIN_RAND is 0 by default, then the modulus needs to divide (MAX_RAND + 1).

In the general case, there's no rule in any uniform continuous implementation of rand such as (modulus + 1) needs to divide a specific number.

1
45678