Date:2010-12-01 14:59:27 (8 years 7 months ago)
Author:Werner Almesberger
Commit:8ea171512bf81c6eae91399cfaa2c28fa7bce67b
Message:usrp/range: more useful diagnostic output and harden against underflows

- usrp/range: ignore "-inf" values
- usrp/range: print the average value when reporting an outlier
Files: usrp/range (2 diffs)

Change Details

usrp/range
2222
2323while (<>) {
2424    chop;
25    next if $_ eq "-inf";
2526    push(@v, $_);
2627    $s += $_;
2728}
...... 
3031$n = 0;
3132for (@v) {
3233    $n++;
34    next if $_ eq "-inf";
3335    if ($_ < $avg-$tol || $_ > $avg+$tol) {
34    print STDERR "sample $n is outlier: $_\n" if $verbose;
36    print STDERR "sample $n is outlier ($avg): $_\n" if $verbose;
3537    next;
3638    }
3739    $sum += $_;

Archive Download the corresponding diff file



interactive