Nov 1st 2010, 6:17:50
Wait a second... why are you using mt_getrandmax() in your "return (mt_rand()/mt_getrandmax());" statement?
Isn't that consistently going to give you a return with incredibly small exponents? Don't you just want to do "return (mt_rand(1, 100)/100);"?
I set up a test page at http://inklined.net/test/. It's just a sample of 20 mt_rand(1, 100)/mt_getrandmax() returns. To be fair, it's all just random number, and I don't know how the random number influence your formula but I can't imagine why you'd want exponents in the E-8 or larger range.
EDIT: I made an error above, I forgot that the arguments added to mt_rand() were mine... that page no longer shows what I said it does.
-Fooglmog
Guy with no clue.
Isn't that consistently going to give you a return with incredibly small exponents? Don't you just want to do "return (mt_rand(1, 100)/100);"?
I set up a test page at http://inklined.net/test/. It's just a sample of 20 mt_rand(1, 100)/mt_getrandmax() returns. To be fair, it's all just random number, and I don't know how the random number influence your formula but I can't imagine why you'd want exponents in the E-8 or larger range.
EDIT: I made an error above, I forgot that the arguments added to mt_rand() were mine... that page no longer shows what I said it does.
-Fooglmog
Guy with no clue.