"""Implement an EMA with first-value seed.

Different initialization conventions can disagree early in the sample.
All inputs are synthetic teaching examples. Run: python 15_exponential-average.py
"""
from tv_math import *

v=ema([10,13,10],2)
assert abs(v[1]-12)<1e-12 and abs(v[2]-10.6666666667)<1e-9
print(v)
