Use floating point for average calculation