fix `expt' on small negative number and large positive odd

The pow() function apparently gets it wrong on some platforms.

Closes PR 13391