[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: [xquery-talk] Re: Random number generation : requ

Subject: Re: [xquery-talk] Re: Random number generation : requirements
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 7 May 2014 07:08:39 -0000
Re: [xquery-talk]  Re: Random number generation :  requ
On 7 May 2014, at 07:31, Wolfgang Laun wolfgang.laun@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> I think that a random() in XSLT should be provided in a way that lets
> you call several random number generators (of the same kind) in
> parallel. Generators may exhibit a big difference between a sequence
> where all elements are due to successive calls of the same generator
> and one where a sufficient number of generators is called one by one.
>
> For instance: In Dimitre's example: values returned alternate between
> even and odd, and using this to generate random points (x,y) in 2D
> omits 50% of the possible points. And this is typical for an entire
> class of random generators.
>

One of the inherent weaknesses of any pseudo-random number generator where the
N'th value in the sequence is a function of the (N-1)th value is that it can
get into loops. For example, if the same value appears twice consecutively
(which in a truly random sequence will sometimes happen), then all subsequent
values will be the same.


Michael Kay
Saxonica

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.