数学不是我最擅长的,而且我是 Python 新手。我需要帮助来理解以下公式:
净营运资本= MAX(总流动资产-超额现金-(总流动负债-(总债务-长期债务)),0)
我不知道上面等式中的 MAX 是什么以及零的含义。从我收集到的信息来看,函数 max(x,0) 被称为实数 x 的正数部分。另外,是否可以在python中进行此计算?
谢谢
max(x,0)
意思是“返回其中最大的一个”。它在那里使用,因此净营运资本永远不会小于零,即 NWC 不能为负。
在python中,这段代码是:
def net_working_capital(
total_current_assets,
excess_cash,
total_current_liabilites,
total_debt,
long_term_debt
):
return max(total_current_assets - excess_cash - (total_current_liabilites - (total_debt - long_term_debt)), 0)
print(net_working_capital(10000, 1000, 1000, 1000, 1000))
# prints 8000
print(net_working_capital(0, 1000, 1000, 1000, 1000))
# prints 0
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句