Commit 88b74f92 authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder

Fix log(p)=0 case.

2005-06-01  Morten Welinder  <terra@gnome.org>

	* extra.c (qcauchy): Fix log(p)=0 case.
parent 1d49db10
2005-06-01 Morten Welinder <terra@gnome.org>
* extra.c (qcauchy): Fix log(p)=0 case.
2005-05-27 Morten Welinder <terra@gnome.org>
* Makefile.am (rstat_la_SOURCES): Add extra.[ch]
......
......@@ -29,7 +29,8 @@ qcauchy (gnm_float p, gnm_float location, gnm_float scale,
if (log_p) {
if (p > -1)
lower_tail = !lower_tail, p = -gnm_expm1 (p);
/* The "0" here is important for the p=0 case: */
lower_tail = !lower_tail, p = 0 - gnm_expm1 (p);
else
p = gnm_exp (p);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment