Keep two digits:
num = math . round(num * 100)/ 100;
The binary system of the computer is actually an approximation when 0. 1 is expressed as decimal, so there is this problem.