def sech(y): return (2.0 * cosh(y)) / (cosh(2.0 * y) + 1.0)
def sech(y): return (2.0*cosh(y)) / (cosh(2.0*y) + 1.0)
def sinh(self, o, fp): f, = o.ufl_operands return fp * cosh(f)
def sinh(self, o, a): f, fp = a o = self.reuse_if_possible(o, f) op = fp*cosh(f) return (o, op)
def tanh(self, f): "d/dx tanh x = (sech(x))^2 = (2 cosh(x) / (cosh(2x) + 1))^2" x, = f.operands() return (((2.0*cosh(x))/(cosh(2.0*x) + 1.0))**2,)
def sinh(self, f): "d/dx sinh x = cosh(x)" x, = f.operands() return (cosh(x),)
def sinh(self, o, a): f, fp = a o = self.reuse_if_possible(o, f) op = fp * cosh(f) return (o, op)