﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
2977	Random() returns zero on statistically valid inputs	anonymous		"Hi devs,

This appears to be coded intentionally to behave like this (from reading the Help documentation), but the behaviour itself is simply wrong.

{{{
$test=Random(1,1,1)
MsgBox(0,@error,$test)
}}}
This currently yields 0, presumably because the range is zero. But this is a conceptual mistake.

Consider a vase with a variable (N)umber of balls, numbered consecutively 1-N. If there are three balls (labelled 1,2,3 resp.), my chances of pulling out ball 1 are 1 in 3. If there are two balls, the chance of pulling out ball 1 is 50%. But if the vase contains only ball 1, my chances of pulling out ball 1 are of course 100%, not zero/error.

Exepcted Behaviour: If min=max, return min (or max)
Anything else is counter-intuitive and statistically indefensible.
Cheers,
RT"	Bug	closed		AutoIt	3.3.12.0	None	Fixed		
