Ternary

I am adding in a ternary calculation