Math functions for working on arrays.