Author

Topic: MWC1616 (Read 135 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
March 04, 2024, 05:09:20 AM
#3
After looking many pages, i believe this is original documentation for MWC1616 http://www.helsbreth.org/random/rng_mwc1616.html. One of documentation for JavaScript V8 engine also briefly explain how they use MWC1616 on https://github.com/v8/v8.dev/blob/main/src/blog/math-random.md.

You can find the right answer on ChatGPT, that's the right way to use artificial intelligence.

--snip--

I hope this information helps you, and i highly recommend dealing with AI for this kind of question, because if you want to get on details or if you have any other questions about the topic, then the AI has a great explanation for you.

FWIW, the constant/multiplier on that pseudocode doesn't match MWC1616 doc.
legendary
Activity: 3346
Merit: 3125
March 03, 2024, 02:19:18 PM
#2
You can find the right answer on ChatGPT, that's the right way to use artificial intelligence.

Quote
Here's a simplified description of how seeding might work for an MWC generator:
1.-Initialization: The generator's state, which typically consists of two 16-bit integers, is initialized based on the seed value. The seed value might be a single 32-bit integer or two separate 16-bit

2.-Multiplier Constants: MWC generators use specific constants as multipliers to produce a new random value in each iteration. These constants are chosen to ensure good statistical properties of the generated sequence.

3.-Seed Expansion: The seed is used to initialize the internal state, and the generator goes through a series of iterations to mix and expand the seed values across its internal state.

4.-Random Output: Once the generator is seeded, it can produce pseudorandom numbers by iteratively applying the multiply-with-carry operations to its internal state.

Here is a high-level Python-like pseudocode for a simplified MWC1616 seeding process:

Code:
class MWC1616Generator:
    def __init__(self, seed):
        self.state = [0, 0]
        self.multiplier = [0xDEAD, 0xBEEF]  # Example multipliers

        # Seed initialization
        self.state[0] = seed & 0xFFFF
        self.state[1] = (seed >> 16) & 0xFFFF

        # Seed expansion
        for _ in range(10):  # Arbitrary number of iterations
            self.next()

    def next(self):
        # MWC1616 operation
        temp = self.state[0] * self.multiplier[0] + self.state[1]
        self.state[1] = (temp >> 16) & 0xFFFF
        self.state[0] = temp & 0xFFFF

        return self.state[0]

I hope this information helps you, and i highly recommend dealing with AI for this kind of question, because if you want to get on details or if you have any other questions about the topic, then the AI has a great explanation for you.
jr. member
Activity: 32
Merit: 1
March 02, 2024, 08:38:26 AM
#1
Hi does anyone have any insights or information regarding how the random number generator class MWC1616 worked when seeding? Thanks
Jump to: