Problem with some arithmetic!

Hi again!!! ...I'm a little stuck here! I dont' really understand what this is doing...

Code:

` `

#define SAMPLE_RATE 22400

float flangerDelay;

static float sweepValue; /* delay changes depeding on current waveform value */

/* Calculate the total current delay (in ms, not samples!) */

flangerDelay = sweepValue + delay;

/* calculate delay in samples rather than in time */

tmp = flangerDelay * (float)(SAMPLE_RATE/1000);

printf("flangerDelay: %f samples: %d\n", flangerDelay, tmp);

and the output...

Code:

`...`

...

flangerDelay: 0.500000 samples: 0

flangerDelay: 0.500000 samples: 0

flangerDelay: 0.500000 samples: 0

flangerDelay: 0.501000 samples: -1073741824

flangerDelay: 0.501000 samples: -1073741824

flangerDelay: 0.501000 samples: -1073741824

flangerDelay: 0.501000 samples: -1073741824

flangerDelay: 0.501000 samples: -1073741824

flangerDelay: 0.501000 samples: -1073741824

flangerDelay: 0.501000 samples: -1073741824

flangerDelay: 0.501000 samples: -1073741824

flangerDelay: 0.501000 samples: -1073741824

flangerDelay: 0.501000 samples: -1073741824

flangerDelay: 0.501000 samples: -1073741824

flangerDelay: 0.502000 samples: 1610612736

flangerDelay: 0.502000 samples: 1610612736

flangerDelay: 0.502000 samples: 1610612736

flangerDelay: 0.502000 samples: 1610612736

...

...

why if tmp = flangerDelay*(float)(SAMPLE_RATE/1000); is it printing out total crap? For the first samples it should be:

0.5 * (22400 / 1000) = 11.2

I'm very confused!!! anyone know whats going on???