Commit c461ad89 authored by Morten Welinder's avatar Morten Welinder

RANGLOG: Fix.

A sign got flipped in the middle of the formula about 14 years ago.
parent 9b2b9be7
2015-03-20 Morten Welinder <terra@gnome.org>
* src/gnm-random.c (random_logarithmic): Fix. See #746449.
2015-03-19 Morten Welinder <terra@gnome.org>
* src/func.c (dump_samples): New function to dump all sample in
......
......@@ -12,7 +12,8 @@ Morten:
* Actually implement DECIMAL.
* Fix BETA problem with special case.
* Fix MIDB and REPLACEB length check.
* Fix PERMUATIONA.
* Fix PERMUATIONA corner case.
* Fix RANDLOG.
--------------------------------------------------------------------------
Gnumeric 1.12.21
......
......@@ -830,7 +830,7 @@ random_logarithmic (gnm_float p)
do {
u = random_01 ();
} while (u == 0);
q = gnm_expm1 (c * u);
q = -gnm_expm1 (c * u);
if (v <= q * q)
return gnm_floor (1 + gnm_log (v) / gnm_log (q));
......
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