[gnumeric] PERMUTATIONA: Fix (0,0) case.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] PERMUTATIONA: Fix (0,0) case.
- Date: Thu, 19 Mar 2015 14:57:14 +0000 (UTC)
commit acaffcf2c6d300ff387a2d72b4c16485f9a8be73
Author: Morten Welinder <terra gnome org>
Date: Thu Mar 19 10:56:44 2015 -0400
PERMUTATIONA: Fix (0,0) case.
=1, as docs say.
NEWS | 1 +
plugins/fn-stat/ChangeLog | 1 +
plugins/fn-stat/functions.c | 2 +-
3 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 628b29e..c2176ee 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,7 @@ Morten:
* Actually implement DECIMAL.
* Fix BETA problem with special case.
* Fix MIDB and REPLACEB length check.
+ * Fix PERMUATIONA.
--------------------------------------------------------------------------
Gnumeric 1.12.21
diff --git a/plugins/fn-stat/ChangeLog b/plugins/fn-stat/ChangeLog
index d27ff22..11a6460 100644
--- a/plugins/fn-stat/ChangeLog
+++ b/plugins/fn-stat/ChangeLog
@@ -1,6 +1,7 @@
2015-03-19 Morten Welinder <terra gnome org>
* functions.c (gnumeric_beta_dist): Fix sample.
+ (gnumeric_permutationa): Fix (0,0) case.
2015-03-04 Morten Welinder <terra gnome org>
diff --git a/plugins/fn-stat/functions.c b/plugins/fn-stat/functions.c
index a6e4416..26c12d9 100644
--- a/plugins/fn-stat/functions.c
+++ b/plugins/fn-stat/functions.c
@@ -4683,7 +4683,7 @@ gnumeric_permutationa (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
if (ix < 0 || iy < 0)
return value_new_error_NUM (ei->pos);
else if (ix == 0 && iy == 0)
- return value_new_float (0);
+ return value_new_float (1);
else
return value_new_float (gnm_pow (ix, iy));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]