这里是我的代码: Double[] x = {1.0, 2.0, 3.0};
Double[] fx = {1.0, 8.0, 27.0};
s = x.length;
Double[][] newton = new Double[(2*s)-1][s+1];
for(int i=0, z=0;i<s;i++,z+=2){
newton[z][0]=x[i];
我想在Ruby中使用bigdecimal/newton模块来实现XIRR。我已经编写了一个脚本,通过遵循this example进行尝试。 当我(在Mac OS X 10.6的Ruby 1.9.2)运行代码,我得到以下错误: /opt/local/lib/ruby1.9/1.9.1/bigdecimal/ludcmp.rb:84:in `div': wrong number of argument