If you want accurate arithmetic, you might want to try using Perl 6:
;-)> my $size = 0.01; 0.01 > my $step_size = 0.01; 0.01 > $size += $step_size while $size < 5; Nil > say "FINAL: $size"; FINAL: 5
In reply to Re: While loop with addition goes weird
by Laurent_R
in thread While loop with addition goes weird
by chiel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |