我在excel表中有公式,返回$ 205.03。我将公式转换为C#代码并生成NaN。 C# Example on dotnetfiddle
Excel公式计算结果
Excel公式:=IFERROR((principalX3/(((1+(1+interestX3*1/12)^(12)-1)^(1/12))^(0) * ((1+(1+interestX3*1/12)^(12)-1)^(1/12))^(0))-0/((1+(1+interestX3*1/12)^(12)-1)^(1/12)-(1+(1+0*1/12)^(12)-1)^(1/12))*((1-((1+(1+interestX3*1/12)^(12)-1)^(1/12))^(-repaymentsX5)*((1+(1+0*1/12)^(12)-1)^(1/12))^(repaymentsX5))/((1+(1+interestX3*1/12)^(12)-1)^(1/12)-(1+(1+0*1/12)^(12)-1)^(1/12))-repaymentsX5*((1+(1+interestX3*1/12)^(12)-1)^(1/12))^(-repaymentsX5)))/(1*(1-0)*(1-0)*(1-((1+(1+interestX3*1/12)^(12)-1)^(1/12))^(-repaymentsX5)*((1+(1+0*1/12)^(12)-1)^(1/12))^(repaymentsX5))/((1+(1+interestX3*1/12)^(12)-1)^(1/12)-(1+(1+0*1/12)^(12)-1)^(1/12))),"")