Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by tlm (Prior)
on Aug 09, 2005 at 13:53 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://482213]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-04-19 10:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found