From 82f37eb0c909d6b590ff7d77e4e67d9dec3b6987 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 14 Apr 1995 01:56:39 +0000 Subject: [PATCH] Added verbose and gamma tests. --- deal.xml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/deal.xml b/deal.xml index d5ff241..5c98297 100644 --- a/deal.xml +++ b/deal.xml @@ -47,6 +47,16 @@ Suppress table headers and legends. -t Set number of draws to display probabilities for (default to 20 or the total number of cards, whichever is less) +.TP 10 +-v +Verbose. Log the computation steps for each hypergeometric +coefficient to standard error. Use this for debugging if you are +a trained numerical analyst (kids, don't try this yourselves at home!). +.TP 10 +-g +Gamma function test. Compute and display the log of the gamma +function of the two arguments. If -v tells you that log_a_choose_b() +is blowing up, this will enable you to probe the local lgamma function. .PP .SH EXAMPLES To compute the probabilities for drawing your 3 Hurloon @@ -61,10 +71,8 @@ To compute your chances of drawing the 4 aces in 5-card draw poker: .SH BUGS For various extreme values of the arguments, the code is prone to -SIGFPE errors in the lgamma() function (it will tell you when this -happens). I think this is due to floating-underflow conditions but -am not familiar enough with the math library or general numerical -analysis to be sure. +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. -- 2.43.0