how to resolve the case of c++ rounding off values, for example:

cos(6.2832) i get 1 instead of .99999

and

0.1 being only 0... what should i do