Faster invert

pow() isn't as fast as it could be here -- with some cleverness, specialized for the particular exponent we care about, we can do better.