in reply to Problems with number resolution
Hold the sum as an integer.
pojmy @nr = (32431.19, 20, -10, -31800); my $x = 0; for (@nr) { $x += $_*100; print "$_ => ".($x/100)."\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problems with number resolution
by Anonymous Monk on Jan 01, 2018 at 19:14 UTC | |
by Laurent_R (Canon) on Jan 02, 2018 at 00:19 UTC | |
by Anonymous Monk on Jan 02, 2018 at 06:57 UTC | |
by Laurent_R (Canon) on Jan 02, 2018 at 08:42 UTC |