On 31/05/06, Andrew Fedoniouk <[EMAIL PROTECTED]> wrote:
----- Original Message -----
From: "liorean" <[EMAIL PROTECTED]>
From mathematic standpoint:
By its definition Math.random() function is not side effect free
in ECMAScript. It uses static variable for generation of pseudo-number
sequences.

Well, the ECMAScript spec states:
15.8.2.14 random ( )
Returns a number value with positive sign, greater than or equal to 0
but less than 1, chosen randomly or pseudo randomly with approximately
uniform distribution over that range, using an
implementation-dependent algorithm or strategy. This function takes no
arguments.


There is nothing in that definition that I find indicates that it has
any side effects. It's all about generating a number, no side effects
are specified or implied.
--
David "liorean" Andersson
<uri:http://liorean.web-graphics.com/>

Reply via email to