better comparison of double values