I have a really strange output result from toString() built in function
Here is my code:
function strangeFunction(num)
{
return num.toString();
}
alert( strangeFunction(121.112*100) ); //output: 12111.199999999999
alert( strangeFunction(.1*100) ); //output: 10
alert( strangeFunction(1.33*100) ); //output: 133
alert( strangeFunction(133.33*100) ); //output: 13333.000000000002
alert( strangeFunction(133.33*100) );//output: 13334
Any suggestions how to fix that issue? It seems that ther is some kind of bug or number formatting issue.