本文整理汇总了Python中math.sinh方法的典型用法代码示例。如果您正苦于以下问题:Python math.sinh方法的具体用法?Python math.sinh怎么用?Python math.sinh使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类math
的用法示例。
在下文中一共展示了math.sinh方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: trig
# 需要导入模块: import math [as 别名]
# 或者: from math import sinh [as 别名]
def trig(a, b=' '):
if is_num(a) and isinstance(b, int):
funcs = [math.sin, math.cos, math.tan,
math.asin, math.acos, math.atan,
math.degrees, math.radians,
math.sinh, math.cosh, math.tanh,
math.asinh, math.acosh, math.atanh]
return funcs[b](a)
if is_lst(a):
width = max(len(row) for row in a)
padded_matrix = [list(row) + (width - len(row)) * [b] for row in a]
transpose = list(zip(*padded_matrix))
if all(isinstance(row, str) for row in a) and isinstance(b, str):
normalizer = ''.join
else:
normalizer = list
norm_trans = [normalizer(padded_row) for padded_row in transpose]
return norm_trans
return unknown_types(trig, ".t", a, b)
示例2: get
# 需要导入模块: import math [as 别名]
# 或者: from math import sinh [as 别名]
def get(self):
self.x += self.config.get('dx', 0.1)
val = eval(self.config.get('function', 'sin(x)'), {
'sin': math.sin,
'sinh': math.sinh,
'cos': math.cos,
'cosh': math.cosh,
'tan': math.tan,
'tanh': math.tanh,
'asin': math.asin,
'acos': math.acos,
'atan': math.atan,
'asinh': math.asinh,
'acosh': math.acosh,
'atanh': math.atanh,
'log': math.log,
'abs': abs,
'e': math.e,
'pi': math.pi,
'x': self.x
})
return self.createEvent('ok', 'Sine wave', val)
示例3: thetappp
# 需要导入模块: import math [as 别名]
# 或者: from math import sinh [as 别名]
def thetappp(self,z_in):
T = self.T_k_in
G = self.G_ksi
J = self.J_in4
l = self.l_in
a = self.a
z = z_in
theta_tripleprime = (-(T*m.cosh(z/a)) + T*m.sinh(z/a)*m.tanh(l/(2*a)))/(G*J*a**2)
return theta_tripleprime
#Case 3 - Concentrated Torque at alpha*l with Pinned Ends
#T = Applied Concentrated Torsional Moment, Kip-in
#G = Shear Modulus of Elasticity, Ksi, 11200 for steel
#J = Torsinal Constant of Cross Section, in^4
#l = Span Lenght, in
#a = Torsional Constant
#alpa = load application point/l
示例4: tile_to_lat_lon
# 需要导入模块: import math [as 别名]
# 或者: from math import sinh [as 别名]
def tile_to_lat_lon(z, x, y):
"""
Returns the lat/lon coordinates of the bottom-left corner of the input
tile.
Inputs:
z -- zoom level value for input tile
x -- tile column (longitude) value for input tile
y -- tile row (latitude) value for input tile
"""
n = 2.0**z
lon = x / n * 360.0 - 180.0
lat_rad = atan(sinh(pi * (2 * y / n - 1)))
#lat_rad = math.atan(math.sinh(math.pi * (1 - 2 * y / n)))
lat = degrees(lat_rad)
return lat, lon
示例5: post_execute
# 需要导入模块: import math [as 别名]
# 或者: from math import sinh [as 别名]
def post_execute(self):
out = {}
if (self.inputs["Operation 1"].default_value == "SIN"):
if (self.inputs["Operation 2"].default_value == "NONE"):
out["Value"] = math.sin(self.inputs["X"].default_value)
elif (self.inputs["Operation 2"].default_value == "HB"):
out["Value"] = math.sinh(self.inputs["X"].default_value)
elif (self.inputs["Operation 2"].default_value == "INV"):
out["Value"] = math.asin(max(min(self.inputs["X"].default_value, 1), -1))
elif (self.inputs["Operation 1"].default_value == "COS"):
if (self.inputs["Operation 2"].default_value == "NONE"):
out["Value"] = math.cos(self.inputs["X"].default_value)
elif (self.inputs["Operation 2"].default_value == "HB"):
out["Value"] = math.cosh(self.inputs["X"].default_value)
elif (self.inputs["Operation 2"].default_value == "INV"):
out["Value"] = math.acos(max(min(self.inputs["X"].default_value, 1), -1))
elif (self.inputs["Operation 1"].default_value == "TAN"):
if (self.inputs["Operation 2"].default_value == "NONE"):
out["Value"] = math.tan(self.inputs["X"].default_value)
elif (self.inputs["Operation 2"].default_value == "HB"):
out["Value"] = math.tanh(self.inputs["X"].default_value)
elif (self.inputs["Operation 2"].default_value == "INV"):
out["Value"] = math.atan(self.inputs["X"].default_value)
return out
示例6: genpy
# 需要导入模块: import math [as 别名]
# 或者: from math import sinh [as 别名]
def genpy(self, paramTypes, args, pos):
return "math.sinh({0})".format(*args)
示例7: __call__
# 需要导入模块: import math [as 别名]
# 或者: from math import sinh [as 别名]
def __call__(self, state, scope, pos, paramTypes, x):
return math.sinh(x)
示例8: compute_delta_theta
# 需要导入模块: import math [as 别名]
# 或者: from math import sinh [as 别名]
def compute_delta_theta(r, rp, phi):
return math.atan(math.tanh(r / K) /
(math.sinh(rp / K) * math.sinh(phi)))
示例9: compute_delta_phi
# 需要导入模块: import math [as 别名]
# 或者: from math import sinh [as 别名]
def compute_delta_phi(r, rp):
return math.atan(math.tanh(r / K) / math.sinh(rp / K))
示例10: testSinh
# 需要导入模块: import math [as 别名]
# 或者: from math import sinh [as 别名]
def testSinh(self):
self.assertRaises(TypeError, math.sinh)
self.ftest('sinh(0)', math.sinh(0), 0)
self.ftest('sinh(1)**2-cosh(1)**2', math.sinh(1)**2-math.cosh(1)**2, -1)
self.ftest('sinh(1)+sinh(-1)', math.sinh(1)+math.sinh(-1), 0)
self.assertEqual(math.sinh(INF), INF)
self.assertEqual(math.sinh(NINF), NINF)
self.assertTrue(math.isnan(math.sinh(NAN)))
示例11: __init__
# 需要导入模块: import math [as 别名]
# 或者: from math import sinh [as 别名]
def __init__(self):
super().__init__()
self.value = 'sinh'
示例12: calculate
# 需要导入模块: import math [as 别名]
# 或者: from math import sinh [as 别名]
def calculate(self, val):
return self.coefficient * ((math.sinh(val))**self.power)
示例13: test_does_not_convert_math_builtins
# 需要导入模块: import math [as 别名]
# 或者: from math import sinh [as 别名]
def test_does_not_convert_math_builtins():
for func in (math.atan2, math.atanh, math.degrees, math.exp, math.floor, math.log,
math.sin, math.sinh, math.tan, math.tanh):
assert convert_to_jit(func) is func
示例14: _marcToLat
# 需要导入模块: import math [as 别名]
# 或者: from math import sinh [as 别名]
def _marcToLat(x):
return math.degrees(math.atan(math.sinh(x)))
示例15: __call__
# 需要导入模块: import math [as 别名]
# 或者: from math import sinh [as 别名]
def __call__(self, val):
return __inline_fora(
"""fun(@unnamed_args:(val), *args) {
PyFloat(math.sinh(val.@m))
}"""
)(val)