本文整理汇总了Python中Output.exponential_output方法的典型用法代码示例。如果您正苦于以下问题:Python Output.exponential_output方法的具体用法?Python Output.exponential_output怎么用?Python Output.exponential_output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Output
的用法示例。
在下文中一共展示了Output.exponential_output方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_range10MatrixWithNegatives
# 需要导入模块: import Output [as 别名]
# 或者: from Output import exponential_output [as 别名]
def test_range10MatrixWithNegatives(self):
string_matrix = '28,45,-73,-75,46,36,21,26,48,30;-86,38,-32,82,-22,-19,-29,100,-72,-3;13,84,-76,-99,-78,94,14' \
',-12,-4,56;43,-91,1,97,-11,59,61,-16,-31,-43;-60,-63,41,-52,-95,86,67,88,79,8;-28,-62,-20,' \
'-34,-51,12,-5,35,-8,-55;15,-93,34,-14,-54,-17,98,-85,-24,72;-81,18,-30,-47,50,11,39,66,90,7;' \
'-98,-87,-84,20,-97,89,19,-13,60,-23;96,44,-71,-36,-46,25,32,85,54,77'
result = 619266553777932419372
self.assertEqual(program.parameter_input(string_matrix), Output.exponential_output(result))
示例2: test_range12MatrixWithNegatives
# 需要导入模块: import Output [as 别名]
# 或者: from Output import exponential_output [as 别名]
def test_range12MatrixWithNegatives(self):
string_matrix = '-2,9,-46,17,50,-73,8,76,29,-77,-69,15;69,-16,65,62,24,-6,71,-80,40,-84,-19,95;27,-33,' \
'-75,-23,-67,-25,-27,36,89,70,-47,-29;85,-90,-97,84,-82,-39,-65,-26,-96,7,100,14;-49,' \
'-9,81,13,38,82,0,-66,-14,44,48,94;-42,78,-35,-86,54,-4,-59,66,4,-72,21,-52;55,39,-58,' \
'-57,-53,-85,-20,-18,49,-79,72,92;83,97,74,52,43,-36,-76,-24,-54,22,56,23;-37,93,-32,18,' \
'-10,-78,3,28,-15,96,-41,-31;-81,47,75,33,12,-94,98,-64,-38,19,-70,-21;80,-48,-7,11,25,' \
'42,31,-56,32,-51,91,-87;-91,63,10,-99,-93,58,26,-45,20,-92,-55,88'
result = 3708810380587217049754426
self.assertEqual(program.parameter_input(string_matrix), Output.exponential_output(result))
示例3: parameter_input
# 需要导入模块: import Output [as 别名]
# 或者: from Output import exponential_output [as 别名]
def parameter_input(string_matrix):
matrix = Input.get_matrix(string_matrix)
result = Determinant.calculate_determinant(matrix)
if str(result).lower().__contains__('e'):
return Output.exponential_output(result)
else:
if result != 0:
return Output.round_number(result)
else:
return 0
示例4: test_range6MatrixWithNegatives
# 需要导入模块: import Output [as 别名]
# 或者: from Output import exponential_output [as 别名]
def test_range6MatrixWithNegatives(self):
string_matrix = '8508,-9325,-9362,-2614,-7723,336;-7099,-7193,8985,-212,1975,-2149;-1740,9829,-8170,2691,' \
'-6467,-3067;-2354,-2589,4993,9189,-6668,9802;8512,-4038,902,8556,-8036,6985;-2253,' \
'5926,-7050,4402,844,-5675'
result = 1300658708375767858497913
self.assertEqual(program.parameter_input(string_matrix), Output.exponential_output(result))