By the edit of the question, explaining what is meant by EPSILON
, the question is now clear, but it might be good to point out the following:
I believe that the original question was triggered by the fact that in C there is a constant DBL_EPSILON
, defined in the standard header file float.h
, which captures what the question refers to. The same standard header file contains definitions of constants DBL_MIN
and DBL_MAX
, which clearly correspond to Double.MIN_VALUE
and Double.MAX_VALUE
, respectively, in Java. Therefore it would be natural to assume that Java, by analogy, should also contain a definition of something like Double.EPSILON
with the same meaning as DBL_EPSILON
in C. Strangely, however, it does not. Even more strangely, C# does contain a definition double.EPSILON
, but it has a different meaning, namely the one that is covered in C by the constant DBL_MIN
and in Java by Double.MIN_VALUE
. Certainly a situation that can lead to some confusion, as it makes the term EPSILON
ambiguous.