in reply to Insights sought into floating point division strangeness
I've got perl 5.8.7 on Windows (ActiveState) - and I get no output. I'm wondering whether there is some OS-specific issue where your numbers (or some of them) are being converted to floats silently.
I'm also wondering whether it would help to try something like this:
use strict; use warnings; my $number_one=1; foreach my $int ( 1 .. 600 ) { my $number = $int / $int; next if $number == $number_one; warn "$int / $int != 1 (== $number)\n"; }
I'm thinking that by comparing variables to another variable, instead of a literal constant, you may get everyone to be in the same form, and thus avoid this problem.
|
|---|