class Utilities {

    public static boolean equalsOrBothNaN(double val1, double val2)
    {
        return val1 == val2 || Double.isNaN(val1) && Double.isNaN(val2);
    }

    private  Utilities();

}