Because you have terminated the if statements with a Semi-colon which just leaves two blocks(the curly braces) and the debug statements. Remove the semi-colons on the end of the if statements.
var a : float = System.Math.Round(1.23987, 2);
var b : float = System.Math.Round(1.241, 2);
if(a == b)
{
Debug.Log(a+" = "+b);
}
if(a != b)
{
Debug.Log(a+" != "+b);
}