Originally posted by: ouaigooo
Thanks, but I would rather use var z2=Math.round(z*Math.pow(10,2));
Anyway:
Your example does not print the trailing zeros in digits.
For instance, 0.997467 prints 1 and not 1.00
So it gets complicated and probably slow if we have to check the number of characters in the string and add trailing zeros or leading spaces if necessary.
It's a pitty there is no fast, embedded function to perform this stuff.
I guess I'm the only one using OPL Script for printing numbers ...
Regards
#DecisionOptimization#OPLusingCPLEXOptimizer