示例#1
0
def length_from_matrix(m):
     t = m.trace()
     if t.real().center() < 0:
         # Trace only determined up to sign
         # We prefer the one with positive real part because
         # SageMath's acosh has undesirable branching behavior.
         t = -t

     return 2 * acosh(t / 2)
示例#2
0
文件: hyperbolic.py 项目: Aang/sympy
 def _sage_(self):
     import sage.all as sage
     return sage.acosh(self.args[0]._sage_())
示例#3
0
 def _sage_(self):
     import sage.all as sage
     return sage.acosh(self.args[0]._sage_())