in reply to limit of for loop!!

... or, use printf:
printf "%.3f\n", $a;
This is a FAQ: Why am I getting long decimals (eg, 19.9499999999999) instead of the numbers I should be getting (eg, 19.95)?