reducing math_util.hpp