def map_constant(self, x, enclosing_prec): if isinstance(x, complex): return "std::complex<%s>(%s, %s)" % ( self.complex_constant_base_type, self.constant_mapper( x.real), self.constant_mapper(x.imag)) else: return SimplifyingSortingStringifyMapper.map_constant( self, x, enclosing_prec)
def map_constant(self, x, enclosing_prec): if isinstance(x, complex): return "std::complex<%s>(%s, %s)" % ( self.complex_constant_base_type, self.constant_mapper(x.real), self.constant_mapper(x.imag)) else: return SimplifyingSortingStringifyMapper.map_constant( self, x, enclosing_prec)