예제 #1
0
 def sech(y):
     return (2.0 * cosh(y)) / (cosh(2.0 * y) + 1.0)
예제 #2
0
 def sech(y):
     return (2.0*cosh(y)) / (cosh(2.0*y) + 1.0)
예제 #3
0
 def sinh(self, o, fp):
     f, = o.ufl_operands
     return fp * cosh(f)
예제 #4
0
 def sinh(self, o, fp):
     f, = o.ufl_operands
     return fp * cosh(f)
예제 #5
0
 def sinh(self, o, a):
     f, fp = a
     o = self.reuse_if_possible(o, f)
     op = fp*cosh(f)
     return (o, op)
예제 #6
0
 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,)
예제 #7
0
 def sinh(self, f):
     "d/dx sinh x = cosh(x)"
     x, = f.operands()
     return (cosh(x),)
예제 #8
0
 def sinh(self, o, a):
     f, fp = a
     o = self.reuse_if_possible(o, f)
     op = fp * cosh(f)
     return (o, op)