Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Algorithm for cancelling common factors between two lists of multiplicands

by tlm (Prior)
on Aug 09, 2005 at 13:53 UTC ( #482213=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub list_reduce {
      my ( $top, $bot ) = map [ grep $_ != 1, @$_ ], @_;
    ...
      my $gcd = Math::BigInt::bgcd( $top, $bottom );
      return ( $top/$gcd, $bottom/$gcd );
    }
    
  2. or download this

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://482213]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2019-10-17 19:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?