[gnumeric] MINA, MAXA: no data causes 0 result.



commit c82f0f27c8b55555b312632b5b750b47d14d7e0f
Author: Morten Welinder <terra gnome org>
Date:   Mon Aug 8 11:55:05 2016 -0400

    MINA, MAXA: no data causes 0 result.
    
    This matches what MIN and MAX do.  It's not particularly sane.

 NEWS                        |    1 +
 plugins/fn-stat/functions.c |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/NEWS b/NEWS
index 023585f..60240cc 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,7 @@ Morten:
        * New function MINIFS.
        * New function MAXIFS.
        * Fix criteria function issue with errors in the selector area.
+       * Fix corner case for MINA and MAXA.
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.31
diff --git a/plugins/fn-stat/functions.c b/plugins/fn-stat/functions.c
index 11fdb1a..b641d71 100644
--- a/plugins/fn-stat/functions.c
+++ b/plugins/fn-stat/functions.c
@@ -2687,7 +2687,7 @@ static GnmValue *
 gnumeric_maxa (GnmFuncEvalInfo *ei, int argc, GnmExprConstPtr const *argv)
 {
        return float_range_function (argc, argv, ei,
-                                    gnm_range_max,
+                                    range_max0,
                                     COLLECT_ZERO_STRINGS |
                                     COLLECT_ZEROONE_BOOLS |
                                     COLLECT_IGNORE_BLANKS |
@@ -2712,7 +2712,7 @@ static GnmValue *
 gnumeric_mina (GnmFuncEvalInfo *ei, int argc, GnmExprConstPtr const *argv)
 {
        return float_range_function (argc, argv, ei,
-                                    gnm_range_min,
+                                    range_min0,
                                     COLLECT_ZERO_STRINGS |
                                     COLLECT_ZEROONE_BOOLS |
                                     COLLECT_IGNORE_BLANKS |


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]