]> thyrsus.com Git - deal.git/commitdiff
Improved the docs.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 14 Apr 1995 14:01:23 +0000 (14:01 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 14 Apr 1995 14:01:23 +0000 (14:01 +0000)
deal.xml

index 7cf7fc829b9354085952363113a218e2a07b4135..9109fe79d924254d51e705bd856352bbd8de8cae 100644 (file)
--- a/deal.xml
+++ b/deal.xml
@@ -15,15 +15,16 @@ Then X has a hypergeometric distribution, with the following formula
 for probabilities:
 
 .nf
-                B(M, i)B(N-M, k-i)
+                B(M, i) * B(N-M, k-i)
      P(X = i) = ---------------------
                       B(N, k)
 .fi
 
-where B(a,b) is read "a choose b", and is the number of ways
-to choose b objects out of a possible objects.  The formula for it is
+where B(a,b) is the binomial coefficient (read "a choose b"), and is the
+number of ways to choose b objects out of a possible objects.  The
+formula for the binomial coefficient is:
 
-    B(a,b) =   a!/(b! (a-b)!)
+    B(n,m) =   n!/(m! * (n-m)!)
 
 This program prints out tables of these probabilities.  The `specials'
 and `total' arguments specify M and N.  The table displays values for
@@ -64,7 +65,7 @@ B(n, k) is blowing up, this will enable you to probe the local lgamma
 function.
 .TP
 -H
-Compute the hypergeometric coefficient H(i, k, M, N) with arguments
+Compute the hypergeometric probability H(i, k, M, N) with arguments
 supplied from the command line.  For debugging.
 .PP
 .SH EXAMPLES
@@ -74,17 +75,11 @@ Gathering" deck (MtG starts you with 7 cards):
 
     deal 3 62
 
-To compute your chances of drawing the 4 aces in 5-card draw poker:
+To compute your chances of having the 4 aces on the nth draw in
+5-card draw poker:
 
     deal -b 5 4 52 
 
-.SH BUGS
-For various extreme values of the arguments, the code is prone to
-SIGFPE errors in the exp() function (it will tell you when this
-happens).
-.PP
-Since it doesn't happen in useful cases, and there is no portable
-fix that I know of, we'll just have to live with it.
 .SH AUTHOR
 Eric S. Raymond <esr@snark.thyrsus.com>.  Based on the `cardprobs'
 program by Jeremy York.  See my home page at