Use std::pow instead of pow to avoid pow double/Complex ambiguity error.