Implementation
This is a generic
Lagged Fibonacci Generator that uses subtraction as its operation.
Using subtraction results in some interesting results: this is the first, and possibly only, PRNG tested that could produce negative numbers. This made the Dice test heavily skewed in favor of the lowest outcome, and exposed a flaw in the Dartboard test.
Test Results
SEED | Number indicates how many results could be obtained before the generator fell into a loop. |
1138 | - | PASS |
65535 | - | PASS |
8675309 | - | PASS |
16777216 | - | PASS |
123456789 | - | PASS |
|
This PRNG is clearly heavily skewed towards lower outputs, mainly due to its ability to create negative numbers. |
SEED | Minimum of 6,000 darts placed needed to pass. |
1138 | 2547 | FAIL |
65535 | 2468 | FAIL |
8675309 | 1446 | FAIL |
16777216 | 1263 | FAIL |
123456789 | 1170 | FAIL |
SEED | 70% or higher required to pass. |
1138 | 101% | PASS |
65535 | 101% | PASS |
8675309 | 101% | PASS |
16777216 | 101% | PASS |
123456789 | 101% | PASS |
|
An ideal result for this test. |
-63518802 | -103182326 | 437802029 | -617065080 | -59616325 | 786584839 | -303775544 | -173933927 | -699104612 | -303519960 | 379681207 | 1006740576 | -855973263 | 838808558 | -597850395 | -88441128 | 625705689 | -471327818 | -109264996 | -420792195 |
-16064100 | -479409805 | -302659319 | -241683439 | -865447349 | 81262229 | -338653262 | -18739710 | 509659692 | 108245948 | 46108479 | -74697320 | -447032830 | 345998905 | -711122330 | -38249643 | -264791446 | -407536524 | -58030849 | -94182886 |
-660125374 | -310578296 | 691048213 | -404272053 | 466225549 | -528601400 | -234452114 | 153771514 | -559882928 | -123312226 | -269088679 | -315130381 | -62157178 | -186543959 | -393413792 | -672255028 | 144781031 | -235470936 | -456541739 | 52982951 |
167862273 | -740476360 | 229078224 | -273098903 | 1045103517 | -407602370 | -417930850 | -197790201 | 448436739 | -896839407 | 503667509 | -571684246 | -936283985 | 88634210 | -295007057 | 887017744 | -512537300 | 244957691 | 456430833 | -318199489 |
742135123 | -350350908 | 23522881 | -43417468 | -696203651 | -501659740 | -718363507 | 219478351 | 211561894 | -802540644 | 764105281 | 206111916 | -475684914 | 636614748 | -215068054 | 65544582 | 252523004 | -107352554 | -888838414 | 852708792 |
-289323135 | 1032268909 | -337232132 | -16313678 | 648517138 | -171694831 | 82364602 | -197406919 | 307114869 | 642974792 | 75214303 | 340648330 | -495131939 | 258993817 | 413124271 | -749186602 | -669522013 | 22112853 | -9599873 | 484660797 |
-773902340 | 97965830 | 624042766 | -277894713 | 188178009 | 681771353 | -438122927 | 824207250 | 828931431 | -977472624 | 73974028 | -102599058 | 471064388 | -582189823 | -472744511 | 966716627 | -913829954 | 432715510 | -220929800 | 350532337 |
265436622 | 576874043 | 1059011837 | -714610290 | 47431923 | 141923094 | -439550062 | -875633929 | 497797767 | -646214621 | 699728851 | -839446922 | -154557174 | 731395320 | 610943701 | -664530783 | 971094488 | -396650015 | 87697561 | 845245109 |
-552247941 | 245668859 | -184963660 | 668471307 | -889304692 | -41977482 | 891502324 | -180736463 | 927847449 | -479923617 | -62591934 | 1014623224 | 172654235 | 1036898984 | -705010417 | -437228874 | 915825434 | -537515892 | -425934874 | 775692480 |
-834392630 | 17957498 | -401323995 | -978764424 | -97536111 | 514674504 | -738504811 | 1073693546 | -867714403 | 669887384 | 244247799 | -445222747 | 85756992 | -617679170 | 889401107 | -166095208 | -307414104 | 314628281 | -166006479 | 568715918 |
-527355540 | -204515028 | 380431465 | 1048288164 | 539101217 | -58795796 | -63215904 | 681530535 | -382958718 | -83588373 | 164748779 | -169861847 | -953136990 | -4673980 | -1066461985 | -942781220 | 1066922445 | -984173670 | 184915385 | -462443889 |
485450255 | 286225281 | -262983250 | 266493455 | -471784798 | 295582903 | -103503274 | -248295507 | 141974046 | -129163642 | 199984514 | -90126666 | -46598641 | 917947357 | 400481217 | -236591263 | 775596834 | -81173402 | 9112709 | 595805706 |
13947738 | -349925725 | 568642964 | -953088715 | 863040423 | -662607548 | -113287198 | 438403371 | -1069930662 | 802594555 | -278103175 | 651545463 | 593639385 | -577611531 | 432499934 | -1040500716 | 822938443 | 101011754 | -628726972 | -906314118 |
-668264859 | 258780310 | -26910762 | -728129176 | 227164254 | 484069590 | -401340042 | 945458681 | 871963588 | 13786689 | 588525870 | 956728958 | -343106349 | 479074813 | -64262279 | 251742491 | -74315982 | -399512479 | 701386621 | -262682296 |
200637532 | -573686078 | 755048737 | 841934892 | -719585577 | 561663576 | -166743409 | 913065109 | 147610395 | -472932508 | -233053514 | -431673596 | -516816524 | 54262640 | -737241885 | -368641452 | 470121852 | -51414317 | 376815717 | 751310482 |
-849253734 | 177391597 | 1070016156 | -781509720 | 475263654 | -866856834 | 529845666 | -725861445 | -993151864 | 205256331 | -695182230 | 167396427 | -322882700 | 654036983 | 396920043 | 186728541 | 156186614 | -425523719 | 939975871 | 875739571 |
-700096762 | -717123104 | -30333554 | -388533384 | -817700948 | -751028574 | -957167322 | -486607106 | 291692032 | -102259096 | 815572761 | -27254404 | 251707579 | 395786814 | -409154520 | 737945950 | -1067494366 | 29789923 | -407168361 | -761344935 |
924841908 | -183103985 | 334139836 | -162205988 | 506426588 | 869852551 | 419782055 | 587860210 | 91292805 | 885713231 | 539239635 | -331455310 | -113503135 | 21080763 | -765349101 | -495269609 | 98225160 | -60817098 | -482881441 | 1073201752 |
-577522750 | 608687774 | -557100070 | 977569024 | 315196857 | -614410851 | 359386359 | -161148972 | 352672623 | -1061205344 | -84523157 | 738113367 | -339290599 | 759663555 | -28440038 | -369312983 | 496207492 | 63163338 | 618193764 | 479826189 |
629672358 | 216526388 | 625712012 | 373103971 | -270611269 | -663090005 | -237100549 | 125479564 | -312524677 | -878668255 | 408614451 | -241726879 | 602440319 | -586889993 | 310995564 | 2799971 | -465510938 | 542490344 | -495288808 | 514878611 |