http://qs1969.pair.com?node_id=482093


in reply to Re^8: Algorithm for cancelling common factors between two lists of multiplicands
in thread Algorithm for cancelling common factors between two lists of multiplicands

You didn't do anything wrong, but you did ask for the internal representation (via rpCutoff) instead of the final ratio (via pCutoff). The internal representation is likely to be insanly huge for large problems.

Save the other code as FishersExactTest.hs and the following as Main.hs and then compile:
ghc -O2 -o fet --make Main.hs
to get a program fet that you can pipe a matrix into.

module Main (main) where import FishersExactTest (pCutoff) main = interact $ show . pCutoff . map (map read . words) . lines
See my earlier node (Re^5: Algorithm for cancelling common factors between two lists of multiplicands) for an example of usage.