-->

Cplex(number of decimal)

2019-07-31 11:22发布

问题:

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

regards



回答2:

precision decimal

I want augment precision decimal.



标签: cplex ilog