Cplex(number of decimal)

2019-07-31 10:53发布

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?

标签: cplex ilog
2条回答
再贱就再见
2楼-- · 2019-07-31 11:44

precision decimal

I want augment precision decimal.

查看更多
Deceive 欺骗
3楼-- · 2019-07-31 11:47

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

regards

查看更多
登录 后发表回答