Commit 106f0456 authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder
Browse files

Avoid infinite loop for NB==0, n==x. NOTE: Changed directly in genereated

2005-10-10  Morten Welinder  <terra@gnome.org>

	* src/mathfunc.c (pdhyper): Avoid infinite loop for NB==0, n==x.
	NOTE: Changed directly in genereated code.
parent 97363b6a
2005-10-10 Morten Welinder <terra@gnome.org>
* src/mathfunc.c (pdhyper): Avoid infinite loop for NB==0, n==x.
NOTE: Changed directly in genereated code.
2005-10-08 Jody Goldberg <jody@gnome.org>
* src/cellspan.c (cell_calc_span) : numbers can span when centered
......
......@@ -26,6 +26,7 @@ Morten:
* Fix xml-io's name parsing. [#317427]
* Fix .gnumeric saving of summary items. [#318254]
* Import some style info from Lotus 1-2-3 files.
* Fix infinite loop in pdhyper.
--------------------------------------------------------------------------
Gnumeric 1.5.90
......
2005-10-10 Morten Welinder <terra@gnome.org>
* src/mathfunc.c (pdhyper): Avoid infinite loop for NB==0, n==x.
NOTE: Changed directly in genereated code.
2005-10-08 Jody Goldberg <jody@gnome.org>
* src/cellspan.c (cell_calc_span) : numbers can span when centered
......
......@@ -3329,7 +3329,7 @@ static gnm_float pdhyper (gnm_float x, gnm_float NR, gnm_float NB, gnm_float n,
gnm_float sum = 0;
gnm_float term = 1;
while (x > 0 && term >= GNM_EPSILON * sum) {
while (x > 0 && term > GNM_EPSILON * sum) {
term *= x * (NB - n + x) / (n + 1 - x) / (NR + 1 - x);
sum += term;
x--;
......
Supports Markdown
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