Fix type of expt.

Add expt to random testing.

Haven't seen one of those bugs in a while. Thank you Redex.

Closes PR14823.
Fix other bugs in type of expt.

Found using the new random testing.