Added some numeric helper functions