Calculate Average Reading from TMP36

I am always using this simple smoother (low pass filter):

old_value = read_voltage() //or a good value if you know it

in a loop:
new_value = read_voltage()
new_value = A * new_value + B * old_value
..
old_value = new_value
endloop

Where A+B=1.0, the smaller the A the stronger the filtering/smoothing effect.
For example A=0.1, B=0.9
p.