in reply to Multiply with 100 in perl
$ perl -e 'printf "%.20f\n", 75.600 * 100' 7559.99999999999909050530 $ perl -e 'printf "%.0f\n", 75.600 * 100' 7560
See What Every Programmer Should Know About Floating-Point Arithmetic for more information.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Multiply with 100 in perl
by Anonymous Monk on Nov 11, 2015 at 18:42 UTC |