Hi Guys!
Recently i've been doing a project using my Arduino Uno R3, which is very simple. It is basically just a photoresistor that is used as a motion detector and a 8-ohm speaker from Radioshack. I want to make a burglar alarm that turns on when it spots significant changes in light.

So my code is very short, just above 30 lines of code. You don't really have to study it. But maybe by looking at it would help you answer my question.
int sensor = 14; // sensor pin
int sound = 9; // speaker pin
void setup()
{
Serial.begin(9600); // Serial for Debuging
}
void loop()
{
Serial.println(analogRead(sensor)); // Print out to Serial
int comp = (analogRead(sensor)); // Comp integer which is used later on in the "for" statement to find by how much the light intensity has chaged.
Serial.print("Sensor Read = "); // Debug it
Serial.println(comp);
for (int i=0; i<50; i++) { // Comparing 50 times
int eye = (analogRead(sensor));
int dif = comp - eye; // if is diffirence between the comp light light measure and the current measure
if (dif < -10 || dif > 10) { // If there is an aceptable diffirence in this case 10 then do a sound
tone(sound, 6000);
delay(3000);
noTone(sound);
break;
Serial.println("------------------------------------");
Serial.print("Diffirence = ");
Serial.println(dif);
Serial.println("------------------------------------");
}
delay(100); // do this comparing 10 times per second
}
}
But here is a Mystery (or a fact?)

When I change the
int eye = (analogRead(sensor));
int dif = comp - eye;
To
float eye = (analogRead(sensor));
int dif = comp - eye;
The Sketch size increase from 4,502 bytes to 5,178 bytes, that somewhere 600 bytes. Half a Kilobyte!!

Now i know that longs range from something like -2,123,424,234, to 2,123,453,345 but why do they use so much space?
Would've the programmers from the 60's killed their self if they found out that just one number took the whole computer disk space at that time?!
