$a = 601; foreach $b (0..9) { $c = $a + $b / 10; print "$c: " . (($c * 100) - ($c * 10 * 10)) . "\n"; }
601: 0
601.1: 0
601.2: 7.27595761418343e-12
601.3: -7.27595761418343e-12
601.4: 0
601.5: 0
601.6: 0
601.7: 7.27595761418343e-12
601.8: -7.27595761418343e-12
601.9: 0
Why?
Help get this topic noticed by sharing it on
Twitter,
Facebook, or email.


-
Hi lexore,
Is this an error in one of our Perl books? If so please let us know the book (and page number), and we'll add it to the errata for the book so that it can be corrected in future editions and electronic versions.
Thanks,
Rachel James
O'Reilly Media, Inc. -
-
No, it's not in a book.
It's in Perl )
This report can be deleted to prevent misunderstanding. -