Ported binary and ternary operations to math namespace