Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Below is my output file.
As you can see, some averages are 2.4 and 4.4 and I have no idea why. Obviously the other numbers are correct. Below is my code.qty search 1 search 2 search 3 search 4 search 5 min avg high 2 645 625 645 645 635 625 639 645 1 2,800 2,900 3,000 3,000 2,988 2,800 2.4 3,000 1 5,000 5,495 4,999 4,995 4,900 4,999 4.4 5,495 1 692 770 695 697 678 678 706. 4 770 1 1,949 1,949 3,580 2,900 2,989 1,949 1.8 3,580 1 5,000 5,000 4,950 5,000 5,000 4,950 4.8 5,000
any idea what the problem might be? $se# holds the numbers as seen in the data printout above.my $avg = $se1+$se2+$se3+$se4+$se5; $avg = $avg /5;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Numbers aren't averaging correctly
by pg (Canon) on Oct 06, 2005 at 02:28 UTC | |
by radiantmatrix (Parson) on Oct 06, 2005 at 17:55 UTC | |
|
Re: Numbers aren't averaging correctly
by chester (Hermit) on Oct 06, 2005 at 02:26 UTC | |
by revdiablo (Prior) on Oct 06, 2005 at 14:25 UTC | |
|
Re: Numbers aren't averaging correctly
by GrandFather (Saint) on Oct 06, 2005 at 02:32 UTC | |
|
Re: Numbers aren't averaging correctly
by Hue-Bond (Priest) on Oct 06, 2005 at 18:06 UTC |