#include <iostream>
#include <iomanip>
using namespace std;

void main()
{
    int i;
    bool different;
    double a, b;
	unsigned char *ap, *bp;

    a = 3.09;
    a = a/2.0 + 1.51;
    b = 3.055;

	ap = (unsigned char *) &a;
	bp = (unsigned char *) &b;

    cout << "a=" << a << "    b=" << b << endl;
    cout << hex;
    cout.fill('0');
    for (i=0; i<8; i++)
    {
        cout << setw(2) << (unsigned int) ap[i] << " ";
        cout << setw(2) << (unsigned int) bp[i] << endl;
    }

    different = false;
    for (i=0; i<8; i++)
    {
        if (ap[i] != bp[i])
        {
            different = true;
            break;
        }
    }

    if (different)
        cout << "a != b\n";
    else
        cout << "a == b\n";

    if (a != b)
        cout << "a != b\n";
    else
        cout << "a == b\n";
}