Heterogeneous math

There’s some previous discussion here. (I called it “integer promotion” there.)