I have compared two variable of different types with same values,

```
int i = 100;
short s = (short)100;

if (s == i)
{
   return "Equals";
}
else
{
  return "Not Equals";
}

float f = 100.5f;
double d = 100.5d;

if (d == f)
{
   return "Equals";
}
else
{
  return "Not Equals";
}

```

The First comparison output is "Equal"
and Second Comparison output is " Not Equal"

My Question is 
How same value for short & int are Equal,
If it is Equals then why not same value for float and double are equal.

This is not only for float and double, If we compared decimal it will show compiler error.