开发者

vb script to javascript

开发者 https://www.devze.com 2023-02-17 21:45 出处:网络
Can anyone help me to convert this VB script to equivalent Javascript please. PMT = ((PV -开发者_运维知识库 FV) * rate/ (1 - (1 + rate) ^ -(nper)))

Can anyone help me to convert this VB script to equivalent Javascript please.

PMT = ((PV -开发者_运维知识库 FV) * rate/ (1 - (1 + rate) ^ -(nper)))


Probably

var PMT = ((PV - FV) * rate / (1 - Math.pow(1 + rate, -nper)));

JavaScript numbers are always (at heart) floating-point values, so when you're dealing with money things can get somewhat weird.

0

精彩评论

暂无评论...
验证码 换一张
取 消