List Commands Library for 50g
|
04-05-2018, 06:46 PM
Post: #328
|
|||
|
|||
RE: List Commands Library for 50g
After playing around with LMAX and LMIN a bit, I realized something that I hadn't noticed before: MAX and MIN don't support strings. This is a little surprising given that the comparison operators > and < do support them.
In any event, I added string support to LMAX and LMIN. It grew the footprint to 171 bytes, but I think it definitely adds value to the commands and makes adding them to the library even more sensible. This makes 2 more additions to the new commands since the last release. Others include: LRPC→: reverses the effect of LRPCT LPSHR: "right side" version of LPUSH that treats lists the same as any other single object REV: reverses the elements of a list, string, or number The updated LSHUF is still being tested. The current version utilizes a SplitMix64 PRNG instead of the built-in RAND results, but the SM64 initial seed still comes from the system seed so that RDZ can be used. I've run a series of Chi-squared distribution tests, as well as a series of Kendall-Tau positional change tests. I've also used Pier's "hit rate" test to validate the results. All of the testing has been done with the goal of comparing the new method's results with that of a simple (but far slower) implementation that uses a "RAND * CEIL" sequence for randomization with the Fisher-Yates algorithm. So far, all testing has been favorable. I realize that rigorous testing of randomization/shuffle results is a lengthy and involved process, but I have neither the expertise nor the resources to apply any of the larger test suites to this command. If anyone knows of some other simple tests that might be useful, I'm happy to make an attempt. Otherwise, the current tests may have to suffice for now. If anyone is interested in the approach LSHUF uses, it's essentially this method of the Fisher-Yates shuffle (referred to as the "Modern algorithm" or "Durstenfeld's method"). It also takes into account the need to avoid "modulo bias" as described here. If testing continues to go well, I'll hopefully have another beta (b5) ready sometime next week. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)