Writting an exam about electronic components, i learned several equations about simulating
that stuff. One simplified equation was the tanh(x) formula for the differential
amplifier. It is not exact, but since the amplifiers are driven with only small amplitudes
the behaviour is most often even advanced linear.
The fact, that the amp is differential, means, that the 2n order is eliminated, so the
sound is also similar to a tube.
For a very fast use, this code is in pure assembly language (not optimized with SSE-Code
yet) and performs in VST-Plugins very fast.
The code was written in delphi and if you want to translate the assembly code, you should
know, the the parameters passing is done via registers. So pinp=EAX pout=EDX sf=ECX.