Skip to content

Conversation

@adam4130
Copy link
Contributor

@adam4130 adam4130 commented May 5, 2022

We have an application with an adjoint Monte Carlo simulation that requires a reversible PRNG. We implemented a reversal of your PCG family and thought it useful to include in your samples.

@imneme
Copy link
Owner

imneme commented May 5, 2022

You can also make PCG go backwards using advance. I just wanted to check that you were aware of this…

@adam4130
Copy link
Contributor Author

adam4130 commented May 5, 2022

Yes we did initially use advance but ended up wanting equivalent cost forward and backward.

@mfbalin
Copy link

mfbalin commented Nov 28, 2022

And also, when you want to go backward with advance, let's say n steps, the cost becomes O(64) instead of O(log n). I noticed that going backward was costlier than going forward when using pcg. I think multiplicative inverse trick like this should make it into the library somehow, would increase its usability.

@ELoevbak
Copy link

ELoevbak commented Feb 7, 2023

For the sake of context and motivation for this PR, I am posting a link to our preprint where we use this functionality: https://arxiv.org/abs/2302.02778

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants