Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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

by BrowserUk (Patriarch)
on Aug 11, 2005 at 05:57 UTC ( [id://482852]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    [ 6:46:43.79] P:\test>MP-FET.pl
    8.070604647867604097576877675243109941729476950993498765160880911582E-
    +7030
      1 trial  of _default ( 49.865ms total), 49.865ms/trial
    
  2. or download this
    cancel (x:xs) (y:ys)
        | x == y    = cancel xs ys
        | x < y     = let (xs', ys') = cancel xs (y:ys) in (x:xs', ys')
        | otherwise = let (xs', ys') = cancel (x:xs) ys in (xs', y:ys')
    cancel xs ys    = (xs, ys)
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-20 16:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found