Metric stream related math functions.