Filewatcher File Search File Search
Catalog
Content Search
» » » » » »

Math-Round-Fair-0.02.tar.gz

Homepage:-
Package version:-
Architecture:-
Distribution:Perl-CPAN
Filename:Math-Round-Fair-0.02.tar.gz

/Math-Round-Fair-0.02/README

NAME
    Math::Round::Fair - distribute rounding errors fairly

SYNOPSIS
      use Math::Round::Fair 'round_fair', 'round_adjacent';

      my $cents = 7;
      my @weights = (1, 2, 3, 2, 1);
      my @allocation = round_fair($cents, @weights);

      print "@allocation\n";

      # output will be one of the following:
      # 0 1 3 2 1
      # 0 2 2 2 1
      # 0 2 3 1 1
      # 0 2 3 2 0
      #
more»

/Math-Round-Fair-0.02/Changes

0.02 2010-12-14
    - virtual rewrite with alogorithm and code from Anders Johnson:
      - fixes an over-allocation bug
      - adds round_adjacent

0.01 2009-06-30
    - Initial version

Browse inside Math-Round-Fair-0.02.tar.gz

         [DIR]Math-Round-Fair-0.02/ (8)

Download Math-Round-Fair-0.02.tar.gz

Results 1 - 1 of 1
Help - FTP Sites List - Software Dir.
Search over 15 billion files
© 1997-2017 FileWatcher.com