function FT(A, N, φ) { φ = φ || 0; return function(x) { var n = -1, y = 0; while (++n < N) { y += A[n] * Math.sin(τ * (n + 1) * x + φ); } return y; } }
Ctrl-K f * → φ Ctrl-K t * → τ
Ctrl-K <latin letter> * → <greek equivalent>
In emacs it's
C-| tex
\phi → φ
Now we just need to convince other editors to add something similar...
There are other ways of inputting digraphs: C-x 8 RET lets you enter the name of any unicode symbol.
I wrote about the many ways of inputting digraphs and unicode here:
http://www.masteringemacs.org/articles/2010/10/13/diacritics...