Add a function to math_util