Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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

by tmoertel (Chaplain)
on Aug 09, 2005 at 00:40 UTC ( #482077=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    *FishersExactTest> fac 6
    R {numer = [2,3,4,5,6], denom = []}
    ...
    R {numer = [2,3], denom = []}
    *FishersExactTest> fac 6 `rdivide` fac 3
    R {numer = [4,5,6], denom = []}
    
  2. or download this
    *FishersExactTest> rpCutoff [ [5,0],
                                  [1,4] ]
    R {numer = [2,3,4,5], denom = [7,8,9,10]}
    *FishersExactTest> fromRational . toRatio $ it 
    2.3809523809523808e-2
    
  3. or download this
    module FishersExactTest (pCutoff) where
    
    ...
        | 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://482077]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2023-01-28 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?