const EPSILON = Math.pow(2, -53); //1.1102230246251565e-16 function epsEqu(x,y) { return Math.abs(x - y) < EPSILON; } epsEqu(0.1+0.2, 0.3) //true