Help with map() function!!

From what I can tell, map() does not work with floats. It's return data type is long.
Multiply everything by 1000 or 1000000 and cast to long then map() and divide the result by the multiplier into a float.

edit:
For the mathematically inclined, here's the whole function

long map(long x, long in_min, long in_max, long out_min, long out_max)
{
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}