Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-conforming Isaac64 PRNG #110

Closed
nebulaeonline opened this issue Sep 13, 2023 · 1 comment
Closed

Non-conforming Isaac64 PRNG #110

nebulaeonline opened this issue Sep 13, 2023 · 1 comment

Comments

@nebulaeonline
Copy link

I know this is an older project, but people are probably always looking for a fast PRNG.

Your implementation does not seem to output numbers that jive with those generated from the original C implementation by Bob Jenkins: https://[burtleburtle.net/bob/c/isaac64.c](https://burtleburtle.net/bob/c/isaac64.c

It also does not match the expected output published by the Rust project here: https://docs.rs/rand_isaac/latest/src/rand_isaac/isaac64.rs.html#84

Nor does it match the expected output published by Zig here: https://github.com/ziglang/zig/blob/master/lib/std/rand/Isaac64.zig

I'm an Isaac fan, and your work is great.

The code in your repo outputs the following as the first 16 random 64-bit integers on an unseeded run:

Rng #0 == 0x9d39247e33776d41
Rng #1 == 0x2af7398005aaa5c7
Rng #2 == 0x44db015024623547
Rng #3 == 0x9c15f73e62a76ae2
Rng #4 == 0x75834465489c0c89
Rng #5 == 0x3290ac3a203001bf
Rng #6 == 0x0fbbad1f61042279
Rng #7 == 0xe83a908ff2fb60ca
Rng #8 == 0x0d7e765d58755c10
Rng #9 == 0x1a083822ceafe02d
Rng #10 == 0x9605d5f0e25ec3b0
Rng #11 == 0xd021ff5cd13a2ed5
Rng #12 == 0x40bdf15d4a672e32
Rng #13 == 0x011355146fd56395
Rng #14 == 0x5db4832046f3d9e5
Rng #15 == 0x239f8b2d7ff719cc

The following is the expected output:

Rng #0: 0xf67dfba498e4937c
Rng #1: 0x84a5066a9204f380
Rng #2: 0xfee34bd5f5514dbb
Rng #3: 0x4d1664739b8f80d6
Rng #4: 0x8607459ab52a14aa
Rng #5: 0xe78bc5a98529e49
Rng #6: 0xfe5332822ad13777
Rng #7: 0x556c27525e33d01a
Rng #8: 0x8643ca615f3149f
Rng #9: 0xd0771faf3cb04714
Rng #10: 0x30e86f68a37b008d
Rng #11: 0x3074ebc0488a3adf
Rng #12: 0x270645ea7a2790bc
Rng #13: 0x5601a0a8d3763c6a
Rng #14: 0x2f83071f53f325dd
Rng #15: 0xb9090f3d42d2d2ea

@nebulaeonline
Copy link
Author

I believe you are seeding differently upon further study.

Please disregard.

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

No branches or pull requests

1 participant