search for: congruenti

Displaying 20 results from an estimated 21 matches for "congruenti".

Did you mean: congruent
2010 Oct 09
3
[LLVMdev] [LLVMDev] Does LLVM have a random number generator?
Hello, does LLVM already have a Random Number Generator built into it's library somewhere? I know code generation is suppose to be deterministic, but when producing a random number can be deterministic if the random number generator is also deterministic. - Thanks - Jeff Kunkel
2015 Feb 03
2
Seed in 'parallel' vignette
...s. Other minor suggestions to improve the vignette (if that's what's also done in R; I couldn't easily figure that out from ./src/main/RNG.c): 1) when defining u_n, I would write u_n = z_n / (2^32-208) [as it is immediately clear then that one divides by the modulus of the first linear congruential generator + 1] 2) The case z_n=0 is not provided (for a reason?). If z_n=0, L'Ecuyer suggests to set u_n to "(2^32-209)/(2^32-208)". Cheers, Marius -- Marius Hofert, Dr. rer. nat. Assistant Professor Department of Statistics and Actuarial Science Faculty of Mathematics Univers...
2010 Oct 09
0
[LLVMdev] [LLVMDev] Does LLVM have a random number generator?
I am plugging this into my code. If someone wants to take it out and add it to the llvm library, it's a simple Linear Congruential Generator, but here it is: typedef struct random_number_gen { unsigned a, c, seed, m; random_number_gen( unsigned seed, unsigned modulo ) : seed(seed), m(modulo) { unsigned primes[] = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29 }; a = 1 + primes[ seed % ( siz...
2004 Feb 29
1
LCG with modulo 2^30
I can't run a function which generates random numbrers using linear congruential generator. My multiplier is a=5+8^6, increment is b=1 and modulo is m=2^30. the code I have written works for modulo upto m=2^28. For m= 2^29 , it says, can not allocate memory for the vector or something like that. For m= 2^31 or more, its says the argument "for i in 1:m " is to...
2018 Dec 28
1
[PATCH nbdkit] common: Improve pseudo-random number generation.
Currently we use non-cryptographically secure random numbers in two places, the error filter (to inject errors at random) and the random plugin. For this we have used either random_r or a home-brew-ish Linear Congruential Generator. Use of random_r is problematic on BSDs because it doesn't exist there. Use of the LCG is simply a bad choice. Replace both uses with a better quality and faster PRNG from David Blackman and Sebastiano Vigna called ‘xoshiro256** 1.0’ (http://xoshiro.di.unimi.it/). This is licens...
2018 Dec 28
2
[PATCH v2 nbdkit] common: Improve pseudo-random number generation.
v2: - Fix seeding. - Add a test that nbdkit-random-plugin is producing something which looks at least somewhat random. Rich.
2018 Dec 28
0
[PATCH v2 nbdkit] common: Improve pseudo-random number generation.
Currently we use non-cryptographically secure random numbers in two places, the error filter (to inject errors at random) and the random plugin. For this we have used either random_r or a home-brew-ish Linear Congruential Generator. Use of random_r is problematic on BSDs because it doesn't exist there. Use of the LCG is simply a bad choice. Replace both uses with a better quality and faster PRNG from David Blackman and Sebastiano Vigna called ‘xoshiro256** 1.0’ (http://xoshiro.di.unimi.it/). This is releas...
2008 Aug 14
2
[R] RNG Cycle and Duplication (PR#12540)
...The other three meth= ods=20 >> had cycle length of 2^32. >>=20 >> So, anybody can explain this? And any improvement to the implementation = can=20 >> be made to increase the cycle length like the Wichmann-Hill method? >>=20 > What test? These are not simple linear congruential generators. Just beca= use=20 > you get the same value twice, it doesn't mean that the sequence is repeat= ing.=20 > Perhaps you should read the entire help page rather than just the note. > > --=20 > O__ ---- Peter Dalgaard =D8ster Farimagsgade 5, Entr.B > c/...
2010 Oct 09
0
[LLVMdev] [LLVMDev] Does LLVM have a random number generator?
...can specify the seed > would be preferred over the C-style srand(), rand() because at that > point rand() would not be thread safe. > >> >>> I am plugging this into my code. If someone wants to take it out and >>> add it to the llvm library, it's a simple Linear Congruential >>> Generator, but here it is: >>> >>>    typedef struct random_number_gen { >>>      unsigned a, c, seed, m; >>>      random_number_gen( unsigned seed, unsigned modulo ) : >>> seed(seed), m(modulo) { >>>        unsigned primes[] = {...
2015 Mar 08
0
Seed in 'parallel' vignette
...estions to improve the vignette (if that's what's also > done in R; I couldn't easily figure that out from ./src/main/RNG.c): > 1) when defining u_n, I would write u_n = z_n / (2^32-208) [as it is > immediately clear then that one divides by the modulus of the first > linear congruential generator + 1] > 2) The case z_n=0 is not provided (for a reason?). If z_n=0, L'Ecuyer > suggests to set u_n to "(2^32-209)/(2^32-208)". > > Cheers, > Marius > > > > > -- > Marius Hofert, Dr. rer. nat. > Assistant Professor > Department of Stat...
2008 Aug 14
0
[R] RNG Cycle and Duplication (PR#12537)
...ted by runif using Wichmann-Hill. The other three > methods had cycle length of 2^32. > > So, anybody can explain this? And any improvement to the > implementation can be made to increase the cycle length like the > Wichmann-Hill method? > What test? These are not simple linear congruential generators. Just because you get the same value twice, it doesn't mean that the sequence is repeating. Perhaps you should read the entire help page rather than just the note. -- O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics...
2005 Feb 02
4
(no subject)
...Precipitation in US Cities presidents Quarterly Approval Ratings of US Presidents pressure Vapor Pressure of Mercury as a Function of Temperature quakes Locations of Earthquakes off Fiji randu Random Numbers from Congruential Generator RANDU rivers Lengths of Major North American Rivers rock Measurements on Petroleum Rock Samples sleep Student's Sleep Data stack.loss (stackloss) Brownlee's Stack Loss Plant Dat...
2007 Apr 24
5
Random Number Generator of Park and Miller
Hi, I failed to search for R package providing random number generator of "Park and Miller". Anyone know any R package supporting this kind of function? Thanks, Grace -- View this message in context: http://www.nabble.com/Random-Number-Generator-of-Park-and-Miller-tf3636501.html#a10154554 Sent from the R help mailing list archive at Nabble.com.
2008 Aug 14
2
RNG Cycle and Duplication
Hello all, I am generating large samples of random numbers. The RNG help page says: "All the supplied uniform generators return 32-bit integer values that are converted to doubles, so they take at most 2^32 distinct values and long runs will return duplicated values." But I find that the cycles are not the same as the 32-bit integer. My test indicated that the cycles for
1997 Sep 15
0
R-alpha: set.seed(.) [was 'compatibility']
...n R with a different basic RNG (with a longer period), -- see ?.Random.seed -- we would want set.seed(i) to also guarantee that the locations in the periodic cycle are far apart. I think (but may be wrong; I must do other things now !!) this can be better achieved by just changing one of the 3 congruential generators involved. This leads to the following proposal : set.seed <- function (i) { if(length(i) != 1 || i != (ii <- as.integer(i))) stop("argument to set.seed() must be integer(1)") i <- ii if (i > 1024 || i < 1) { warning("set.seed(i) h...
2018 Dec 31
1
Re: [PATCH v2 nbdkit] common: Improve pseudo-random number generation.
On 12/28/18 2:55 PM, Richard W.M. Jones wrote: > Currently we use non-cryptographically secure random numbers in two > places, the error filter (to inject errors at random) and the random > plugin. For this we have used either random_r or a home-brew-ish > Linear Congruential Generator. Use of random_r is problematic on BSDs > because it doesn't exist there. Use of the LCG is simply a bad > choice. > > Replace both uses with a better quality and faster PRNG from David > Blackman and Sebastiano Vigna called ‘xoshiro256** 1.0’ > (http://xoshiro....
1997 Nov 24
0
R-alpha: random number generator -- S-plus's
...;,j, " 0:63 = R..[[j]]: ", all.equal(0:63, RRt2[[j]])) } X X X X X X ##--> only 1, 6, 12 are NOT == 0...63 ## [[1]] = 1 5 9 .. 61 (( = 1 + 4*j , j= 0..15 )) ## [[6]] = [[12]] = 0..3 X X RS <- rep(0,12) #.Random.seed _ RS ##>> Error: Invalid random number seed: congruential part must be odd RS[1] _ 1 X.Random.seed _ RS #--> 1st part == congruential part ! for(i in 1:20){ print(.Random.seed); runif(1)} #- the 2nd part STAYS 0 !! RS2 <- RS RS2[12] _ 1 X.Random.seed _ RS2 for(i in 1:20){ print(.Random.seed); runif(1)} #- 1st part == 1st part above! X ###==> f...
1997 Apr 22
1
SNI-12: BIND Vulnerabilities and Solutions (fwd)
...THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + /* + * seed = random 15bit + * n = prime, g0 = generator to n, + * j = random so that gcd(j,n-1) == 1 + * g = g0^j mod n will be a generator again. + * + * X[0] = random seed. + * X[n] = a*X[n-1]+b mod m is a Linear Congruential Generator + * with a = 7^(even random) mod m, + * b = random with gcd(b,m) == 1 + * m = 31104 and a maximal period of m-1. + * + * The transaction id is determined by: + * id[n] = seed xor (g^X[n] mod n) + * + * Effectivly the id is restricted to the lower 15 bits, thus + * yie...
2009 Nov 24
9
Best practices for zpools on zfs
Suppose I have a storage server that runs ZFS, presumably providing file (NFS) and/or block (iSCSI, FC) services to other machines that are running Solaris. Some of the use will be for LDoms and zones[1], which would create zpools on top of zfs (fs or zvol). I have concerns about variable block sizes and the implications for performance. 1.
2013 Aug 28
0
[LLVMdev] Adding diversity for security (and testing)
On Mon, Aug 26, 2013 at 9:14 PM, Todd Jackson <quantum.skyline at gmail.com>wrote: > > > We would also include a secure random number generator which links >> > against OpenSSL. This would of course be an optional module disabled >> > by default, but is necessary so the randomization is cryptographically >> > secure and useful in security applications.