Cplex(number of decimal)

青春壹個敷衍的年華 提交于 2019-12-11 07:54:15

问题


enter image description herehi, how can I increase the number of digits after the comma (number of decimal) in CPLEX for objectif fonction?

thank you cordially?


回答1:


You could read this CPLEX technote:

http://www-01.ibm.com/support/docview.wss?uid=swg21615825

I gave the example

float f = sqrt(2);
execute {
function formatFloat_prec8 (f) {
f = Math.round(f*100000000);
var fs = f.toString();
fs = fs.substring(0,fs.length-8)+','+fs.substring(fs.length-8,fs.length);
return fs;
}
writeln(formatFloat_prec8(f));
};

which gives

1,41421356

at https://www.ibm.com/developerworks/community/forums/html/topic?id=8522d33e-966a-4ac3-9b88-4ae8df46d5c7&ps=25




回答2:


precision decimal

I want augment precision decimal.



来源:https://stackoverflow.com/questions/54849876/cplexnumber-of-decimal

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!