Implementing complex numbers and FFT with just datatypes (2023)

14 surprisetalk 2 5/25/2025, 3:10:00 PM gist.github.com ↗

Comments (2)

LegionMammal978 · 6h ago
Balanced ternary is an odd choice for signed integers, when it seems like two's-complement integers would work just as well here. (That is, start with primitives 0 = ...00000 and -1 = ...11111, and construct 2x and 2x+1 from those.)
aleph_minus_one · 2h ago
Or simply use binary (in the sense of digits 0,1) numbers with respect to base -2.