need to convert the nominator to double before making the division , like double div = ((double)xLong) / yLong.