Laurent, why do you include <math.h> and use cos() and sin() in the global namespace instead of <cmath> and std::cos(), std::sin()? A C++ conforming implementation isn't required to supply the old C headers (even though the most probably do).
Besides, the C functions ::cos() and ::sin() use double for computation; the float overload is located inside namespace std.