Script not working like it should

This script is meant to make people need food, and when they don't have enough, kill them and raise unhappiness. That part works fine. However it's also supposed to make them eat food when they're hungry and produce food. What happens is they immediately eat all of their food and start dying when they supposedly produce as much as they consume. Please help. I've tried a lot of different things and nothing seems to work. Here's the code:

var population = 100;
var food = 100;
var happiness = 60.0;
var farms = 5;
var harvest = farms * 5;
var hunger = population * 0.25;
var starvation = 0.0;

function Update ()
{
    food += harvest * Time.deltaTime;
    food -= hunger * Time.deltaTime;

    if (food < population / 2)
       happiness -= 0.01 * Time.deltaTime;

    if (food < 1)
       happiness -= 1 * Time.deltaTime;

    if (1 > food)   
       starvation += 0.1 * Time.deltaTime;

    if (1 < starvation)
       population -= 1;

    if (1 < starvation)
       starvation -= 1;
}

When declaring "var food=100;", food is recognized as an integer. So adding a fraction to it will keep the value at 100, and subtracting a fraction will immediatedly make it drop down to 99. You need to initialize food like this: "var food=100.0;" or this: "var food=100:float;".

Note also that you probably don't want to put the whole functionality in Update(), since that is called every frame :-)