Examples of nextInt32()


Examples of org.jquantlib.math.randomnumbers.MersenneTwisterUniformRng.nextInt32()

            0.54587026, 0.48713246, 0.32920155, 0.08719954, 0.63497059, 0.54328459, 0.64178757, 0.45583809,
            0.70694291, 0.85212760, 0.86074305, 0.33163422, 0.85739792, 0.59908488, 0.74566046, 0.72157152
        };

        for (int i = 0; i < refInt.length; ++i) {
            final long r = mt.nextInt32();
            assertEquals(refInt[i], (r & 0x7fffffffl) | ((r < 0) ? 0x80000000l : 0x0l));
        }

        for (int i = 0; i < refDouble.length; ++i) {
            final long r = mt.nextInt32();
View Full Code Here

Examples of org.jquantlib.math.randomnumbers.MersenneTwisterUniformRng.nextInt32()

            final long r = mt.nextInt32();
            assertEquals(refInt[i], (r & 0x7fffffffl) | ((r < 0) ? 0x80000000l : 0x0l));
        }

        for (int i = 0; i < refDouble.length; ++i) {
            final long r = mt.nextInt32();
            assertEquals(refDouble[i],
                         ((r & 0x7fffffffl) | ((r < 0) ? 0x80000000l : 0x0l)) / 4294967296.0,
                         1.0e-8);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.