Numbers inject waves: 1.2, 1@90 (magnitude@degrees), 0.5i. Operators: . # starts a comment.
Outlets (final stack)
| # | A | |A|∠φ | |A|² |
|---|
Energy budget
Trace
Operator math
Each operator pops named operands (the last name is the top of the stack) and pushes the results of complex expressions. Energy is |A|^2. You can edit any formula with ⬡ Update → Math; the sandbox runs whatever is written here.
Expression language: + - * / ^, i, pi, e, functions , constants .
Why the corrections
- SPLIT ÷√2, not ÷2. Energy is |A|², so (A/2)² + (A/2)² = A²/2 loses half the energy with nowhere for it to go. With A/√2 the halves add back to A².
- Phase. With real numbers, INTF is just addition and can never cancel. A complex A = |A|eiφ lets two arms 180° apart sum to zero, which is the dark port of a Mach–Zehnder.
- No free energy. Adding 1.2 + 0.8 = 2.0 takes energy 2.08 to 4.00. Switch on math as posted in the sandbox to watch the energy check flag it.
Corrected WaveStack (Python)
The thread's script with complex amplitudes, the √2 splitter, PHASE/VALVE/MIX/DET, and an energy ledger. Standard library only. Download wavestack.py
Update log
Every update is appended, never rewritten. Each entry stores spec_sha256 (the spec after the update) and prev (the SHA-256 of the previous entry), so any edit to history breaks the chain.
Updates are saved in this browser (localStorage). To publish one to everyone at fluid.somacosf.com, export it or copy the share link and send it to Devin.