num pow(num x, num exponent) { final e = exponent.truncateToDouble(); if (e == exponent) { return _powi(x, e.toInt()); } return math.pow(x, exponent); }