@Override
    public Boolean value(final Double a, final Double b) {
        if (a == null || b == null ||
                Double.isInfinite(a) || Double.isNaN(a) ||
                Double.isInfinite(b) || Double.isNaN(b))
            return false;
        double denominator = Math.abs(a) + Math.abs(b);
        if (denominator == 0.0)
            return true;
        denominator /= 2.0; // The denominator is now the average absolute value.
        /*
         * In an attempt to not destroy a large number of significant
         * digits the code does not subtract a from b, but considers
         * if the value b divided by the denominator is within the
         * precision of the value a divided by the denominator.
         * See [1].
         */
        return a / denominator - this.getPrecision() <= b / denominator &&
                b / denominator <= a / denominator + this.getPrecision();
    }