def tan(self, o, fp): f, = o.ufl_operands return 2.0 * fp / (cos(2.0 * f) + 1.0)
def tan(self, o, fp): f, = o.ufl_operands return 2.0*fp / (cos(2.0*f) + 1.0)
def sin(self, o, fp): f, = o.ufl_operands return fp * cos(f)
def tan(self, o, a): f, fp = a o = self.reuse_if_possible(o, f) op = fp*2.0/(cos(2.0*f) + 1.0) return (o, op)
def sin(self, o, a): f, fp = a o = self.reuse_if_possible(o, f) op = fp*cos(f) return (o, op)
def tan(self, f): "d/dx tan x = (sec(x))^2 = 2/(cos(2x) + 1)" x, = f.operands() return (2.0/(cos(2.0*x) + 1.0),)
def sin(self, f): "d/dx sin x = cos(x)" x, = f.operands() return (cos(x),)
def tan(self, o, a): f, fp = a o = self.reuse_if_possible(o, f) op = fp * 2.0 / (cos(2.0 * f) + 1.0) return (o, op)
def sin(self, o, a): f, fp = a o = self.reuse_if_possible(o, f) op = fp * cos(f) return (o, op)