public function intPow(IntType $a, NI $exp)
    {
        if ($exp instanceof RationalType) {
            $b = new RationalType(clone $a, new IntType(1));
            return $this->rationalPow($b, $exp);
        }

        if ($exp instanceof ComplexType) {
            return $this->intComplexPow($a(), $exp);
        }

        //int and float types
        $p = pow($a(), $exp());
        if (($p - intval($p)) === 0) {
            return new IntType($p);
        }

        return RationalTypeFactory::fromFloat($p);
    }