aboutsummaryrefslogtreecommitdiff
path: root/extmod/modurandom.c
AgeCommit message (Collapse)Author
2017-02-24extmod/modurandom: Use mp_raise_ValueError().Paul Sokolovsky
For the standard unix x86_64 build, this saves 11 bytes on object file level, but no difference in executable size due to (bloaty) code alignment.
2016-11-30extmod/modurandom: Allow to build with float disabled.Damien George
2016-09-22all: Remove 'name' member from mp_obj_module_t struct.Damien George
One can instead lookup __name__ in the modules dict to get the value.
2016-01-26extmod/modurandom: Add some extra random functions.Damien George
Functions added are: - randint - randrange - choice - random - uniform They are enabled with configuration variable MICROPY_PY_URANDOM_EXTRA_FUNCS, which is disabled by default. It is enabled for unix coverage build and stmhal.
2016-01-17extmod/modurandom: Make yasmarang() function static.Paul Sokolovsky
2016-01-17extmod/modurandom: Add "urandom" module.Paul Sokolovsky
Seedable and reproducible pseudo-random number generator. Implemented functions are getrandbits(n) (n <= 32) and seed(). The algorithm used is Yasmarang by Ilya Levin: http://www.literatecode.com/yasmarang