Sujet : Re: More complex numbers than reals?
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.cDate : 10. Jul 2024, 01:53:19
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v6km1v$1jcln$6@dont-email.me>
References : 1 2 3 4 5
User-Agent : Pan/0.158 (Avdiivka; )
On Tue, 9 Jul 2024 12:00:29 -0700, Chris M. Thomasson wrote:
By the way, did you take a look at my "fun"
experiment wrt storing data in the roots of complex numbers?
You can encode messages in anything.
#!/usr/bin/python3
import sys
charset = ' .Hadefghilmnoprstwx'
modulo = 23
s = 1193321429126088671017703197607273471738040746714878246039040663141374779777444615292185709614467374016367591074170680369683264762098941
num = iter(range(2, 9999))
while s != 1 :
n = next(num)
if s % n == 0 :
sys.stdout.write("%s" % charset[(n - 1) % modulo])
s //= n
#end if
#end while
sys.stdout.write("\n")