use bignum; my $c = 0; for ($x = 0; $x <= 4; $x += 0.05){ $c++; print "[$c] x= $x (".sprintf("%20.40f",$x).") \n"; }