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

Implemented Lagged Fibonacci generator PRNG providing high-speed, medium-quality numbers. #556

Merged
merged 5 commits into from
Mar 21, 2024

Conversation

Knogle
Copy link
Contributor

@Knogle Knogle commented Mar 21, 2024

Just presenting one more option.
Last one i'd like to implement, is a crypto-secure PRNG like AES-CTR.

47f8bd8a-47a0-441f-aa72-379dfd8d395e
efb76e33-705a-4bb2-a33b-383f93306843

@Knogle
Copy link
Contributor Author

Knogle commented Mar 21, 2024

I didn't like the statistical results, so i have implemented the substract-and-carry version of a lagged fibonacci generator.

https://en.wikipedia.org/wiki/Subtract_with_carry

During testing, it has better results than ISAAC-64, it's on par with MT19937.
4591287f-6979-4af8-8a59-d93539069a20
de07b5cb-602f-48d6-b0b5-85cee39f61dd

@PartialVolume
Copy link
Collaborator

Looking good, 16 drive test underway. About 5 hrs to completion.

nwipe_fibonacci_first_16_drive_test-2024-03-21_09.28.22.mp4

@PartialVolume
Copy link
Collaborator

Just a couple of errors for correction.
Screenshot_20240321_102713

and

Screenshot_20240321_103259

@Knogle
Copy link
Contributor Author

Knogle commented Mar 21, 2024

Thanks a lot, fixed that!

@PartialVolume
Copy link
Collaborator

Looks great, thanks. 16 drive test passed.

Screenshot_20240321_160307

@PartialVolume
Copy link
Collaborator

PartialVolume commented Mar 21, 2024

Last problem, formatting does not pass.

-/* The global options struct. */
-nwipe_options_t nwipe_options;
+    /* The global options struct. */
+    nwipe_options_t nwipe_options;
 
 int nwipe_options_parse( int argc, char** argv )
 {

Sorry, if you could fix that. Once corrected are you happy with this branch being merged? I don't see any issues so looks good from my perspective.

@PartialVolume
Copy link
Collaborator

opps, another problem that is affecting compile, a stray character in options.c

gcc -DHAVE_CONFIG_H -I. -I..     -O0 -g -Wall -Wextra -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600  -MT options.o -MD -MP -MF $depbase.Tpo -c -o options.o options.c &&\
mv -f $depbase.Tpo $depbase.Po
options.c:1:1: error: stray ‘\’ in program
    1 | \/*
      | ^
make[2]: *** [Makefile:500: options.o] Error 1

@Knogle
Copy link
Contributor Author

Knogle commented Mar 21, 2024

Sounds good to me! Should be fixed now.
Could you run a full test maybe for XORo as well?

@PartialVolume
Copy link
Collaborator

Sounds good to me! Should be fixed now. Could you run a full test maybe for XORo as well?

Yes, I'll start the xoro test this evening.

@PartialVolume PartialVolume merged commit d40c28b into martijnvanbrummelen:master Mar 21, 2024
2 checks passed
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.

2 participants