3 ms·The Code That Almost Led to Disaster • a Starbase Story2 points by rbanffy 2y agozgs 2y agoThere is a second issue with the code. The calculation of the mean isn't numerically stable. Instead use: mean_power = mean_power + (power - mean_power) / count