예제 #1
0
파일: ccode.py 프로젝트: fperez/sympy
 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)
예제 #2
0
파일: ccode.py 프로젝트: laudehenri/rSymPy
 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)
예제 #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)
예제 #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)