The Geometry and Calculus of Losses