use math.fsum instead of sum