(self, base, exponent)
return self.create_node(node_type=op.POW, args=(base, exponent))
Creates the n-th power of the base.

        The exponent must be a constant.
Creates the n-th power of the base.
Creates the n - th power of the base .
def Pow(self, base, exponent):
        """ Creates the n-th power of the base.

        The exponent must be a constant.
        """
        if not exponent.is_constant():
            raise PysmtValueError("The exponent of POW must be a constant.", exponent)

        if base.is_constant():
            val = base.constant_value() ** exponent.constant_value()
            if base.is_constant(types.REAL):
                return self.Real(val)
            else:
                assert base.is_constant(types.INT)
                return self.Int(val)
        return self.create_node(node_type=op.POW, args=(base, exponent))
def Pow ( self , base , exponent ) : if not exponent . is_constant ( ) : raise PysmtValueError ( "The exponent of POW must be a constant." , exponent ) if base . is_constant ( ) : val = base . constant_value ( ) ** exponent . constant_value ( ) if base . is_constant ( types . REAL ) : return self . Real ( val ) else : assert base . is_constant ( types . INT ) return self . Int ( val ) return self . create_node ( node_type = op . POW , args = ( base , exponent ) )