code: def sinusoid(freq, phase=0.):
    
    # When at 44100 samples / sec, 5 seconds of this leads to an error of 8e-14
    # peak to peak. That's fairly enough.
    for n in modulo_counter(start=phase, modulo=2 * pi, step=freq):
      yield sin(n)
docs: Sinusoid based on the optimized math.sin