In the current _calcSCL method there is a flaw in the rounding logic. If you multiply .1 by any other number less than one your result will be off by one decimal point every time. You can test the flaw with the following code:
I have found that any number greater than .1 and less than .2 will result in this error. If, however, you multiply .1 times a number greater than 1 then the result is correct. The above code simulates setting the rounding on your grid to five decimal places and multiplying two cells that contain .1 and .5 respectively. I’m not sure why the DHTMLX team is opting to do rounding in such a strange way. I’ve not done any performance testing, but the Math.toFixed() method works flawlessly in my testing. If you replace the body of the roundValue() function with one line: return val.toFixed(5); then the function works fine regardless of the value passed to it.