Improve type of expt since inference is bad.

Closes PR 13383.