Speeding up modulo operations in CPython

后端 未结 0 952
天涯浪人
天涯浪人 2021-01-27 04:24

This is a Park-Miller pseudo-random number generator:

def gen1(a=783):
    while True:
        a = (a * 48271) % 0x7fffffff
        yield a

The <

相关标签:
回答
  • 消灭零回复
提交回复
热议问题