#include <iostream>
#include <cmath>
using namespace std;
 
int main ()
{
        double x = 1.0/3.0;
        double y = 7.0/3.0;
        double z = 2.0 + (2.0/3.0);
        double w = z - y;
 
        /***************************************************
        /* The following comparision for equality will fail
        /* even though x and w "should" be equal
        /**************************************************/
        if (x == w)
               cout << "Equal" << endl;
        else
               cout << "Not equal" << endl;
 
        /***************************************************
        /* Notice the different expression used in the if
        /* statement.  This method compares the values of
        /* x and w to see if they are close enough in value 
        /* to consider them equal
        /**************************************************/
        if (fabs(x - w) < 1.0E-10)
               cout << "Equal" << endl;
        else
               cout << "Not equal" << endl;
 
 
        return 0;
}