KronoPI
Date published: 12-Nov-2020
1 min read / 94 words
Python
PI
RNG
seeding
Python Package
KronoPI is a simple Python Package that serves as an RNG, and a seeder for RNG systems.
Generates 4 random numbers based on users current date and time from digits in
PI. It uses the Chudnovsky PI derivation algorithm, to generate PI up to the Nth number with high - but not perfect precision. This allows for the derivation to be done extremely quickly. It's faster than most RNG seeders.Code that generates the PI derivation:
#Setting Decimal number to compute pi togetcontext().prec = 200pi = D(0)# D is Decimal!for k in range(self.MAX):pi += D(math.pow(16, -k)) * (D(4/D(8*k+1)) - D(2/D(8*k+4)) - D(1/D(8*k+5)) - D(1/D(8*k+6)))
why is it called KronoPI?
Named after the Greek God of time Kronos, and PI for PI.