Re: Floating point errors in Perl

2002-12-04 Thread Rob Dixon
Ed A classic problem with a classic solution. Change things to use integer arithmetic: my $increment = 0.01; for (0 .. 100 / $increment) { $percentile = $_ * $increment; print "$percentile\n"; } HTH, Rob - Original Message - From: "Ed Christian" <[EMAIL

RE: Floating point errors in Perl

2002-12-03 Thread Bob Showalter
> -Original Message- > From: Ed Christian [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 03, 2002 3:46 PM > To: [EMAIL PROTECTED] > Subject: Floating point errors in Perl > > > Question for the masses: > > I have a script which iterates through percentiles, > ostensibly starting >