Ejemplo n.º 1
0
 def _print_Function(self, expr):
     if expr.func.__name__ == "ceiling":
         return "ceil(%s)" % self.stringify(expr.args, ", ")
     elif expr.func.__name__ == "abs" and not expr.args[0].is_integer:
         return "fabs(%s)" % self.stringify(expr.args, ", ")
     else:
         return StrPrinter._print_Function(self, expr)
Ejemplo n.º 2
0
 def _print_Function(self, expr):
     if expr.func.__name__ == "ceiling":
         return "ceil(%s)" % self.stringify(expr.args, ", ")
     elif expr.func.__name__ == "abs" and not expr.args[0].is_integer:
         return "fabs(%s)" % self.stringify(expr.args, ", ")
     else:
         return StrPrinter._print_Function(self, expr)
Ejemplo n.º 3
0
 def _print_Function(self, expr):
     func = expr.func.__name__
     if not hasattr(sympy, func) and not func in self.functions:
         self.functions.append(func)
     return StrPrinter._print_Function(self, expr)
Ejemplo n.º 4
0
 def _print_Function(self, expr):
     func = expr.func.__name__
     if not hasattr(sympy, func) and not func in self.functions:
         self.functions.append(func)
     return StrPrinter._print_Function(self, expr)