Hm, I really need to study this more. The early claim that it requires "complicated float arithmetic" took me by surprise. I'm used to fixed-time-period sampling, so you can just do:
// Textbook version:
//average = alpha * new_value + (1-alpha)*average
// Which is equivalent to:
//average += (new_value - average)*alpha
// To get rid of the float, define w=1/alpha and make it an integer.
// If w is a power of 2 (try 8), this is just a shift.
average += (new_value - average) / w
Yeah, it’s easy when alpha is fixed. The complications — the exp() and ln() — come from updating the smoothed rate at varying intervals, whenever a request happens to arrive, so alpha has to be adjusted according to the interval to make sure the exponential decay happens at a fixed speed regardless of the interval.