Remainder operator (%) within JavaScript is getting value other than 0 [duplicate] When I try something like: console.log(19.8 % 6.6); //output: 1.7763568394002505e-15 Am I doing something wrong? From my math, I would expect the output to be 0 as the remainder is 0.