Created mathutil functions