Example #1
0
 def get_pow(cls, backend):
     return ast.BuiltInFunction(funcname='pow',
                                parameters={'base': ast.FunctionDefParameter(symbol='base'
                                , dimension=backend.Unit()),
                                'exp': ast.FunctionDefParameter(symbol='exp'
                                , dimension=backend.Unit())},
                                dimension=backend.Unit())
Example #2
0
 def get_atan2(cls, backend):
     return ast.BuiltInFunction(funcname='atan2',
                                parameters={'x': ast.FunctionDefParameter(symbol='x'
                                , dimension=backend.Unit()),
                                'y': ast.FunctionDefParameter(symbol='y'
                                , dimension=backend.Unit())},
                                dimension=backend.Unit())
Example #3
0
 def get_sqrt(cls, backend):
     return ast.BuiltInFunction(funcname='sqrt',
                                parameters={
                                    'x':
                                    ast.FunctionDefParameter(symbol='x',
                                                             dimension=None)
                                },
                                dimension=None)
Example #4
0
 def get_cosh(cls, backend):
     return ast.BuiltInFunction(funcname='cosh',
                                parameters={
                                    'x':
                                    ast.FunctionDefParameter(
                                        symbol='x',
                                        dimension=backend.Unit())
                                },
                                dimension=backend.Unit())
Example #5
0
 def get_powint(cls, backend):
     return ast.BuiltInFunction(funcname='powint',
                                parameters={'x': ast.FunctionDefParameter(symbol='x'
                                , dimension=None),
                                'n': ast.FunctionDefParameter(symbol='n'
                                , dimension=backend.Unit()),
                                'd': ast.FunctionDefParameter(symbol='d'
                                , dimension=backend.Unit())},
                                dimension=None)
Example #6
0
 def VisitBuiltInFunction(self, o, **kwargs):
     new = ast.BuiltInFunction(
         funcname=o.funcname,
         parameters=o.parameters,
     )
     return copy_std(
         o,
         new,
     )