C:\ghc\ghc-6.4\code>ghc --make FET.hs -o FET.exe
Chasing modules from: FET.hs
Compiling FishersExactTest ( ./FishersExactTest.hs, ./FishersExactTest
+.o )
Compiling Main ( FET.hs, FET.o )
Linking ...
C:\ghc\ghc-6.4\code>FET
989 9400 43400 2400
^Z
1%1
C:\ghc\ghc-6.4\code>echo 989 9400 43400 2400 | FET
1%1
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.
| [reply] [Watch: Dir/Any] [d/l] |
You entered a 4x1 matrix, and so that's why you got an answer of 1. (The code works on general matricies and does not assume the 2x2 case.) Enter the data as a 2x2 matrix to get the result you expect:
$ ./fet
989 9400
43400 2400
^D
... tons of output ...
Cheers, Tom
| [reply] [Watch: Dir/Any] [d/l] |
| [reply] [Watch: Dir/Any] [d/l] |