Examine Spreadlevel: Allow power to be non-integer
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 19 Sep 2020 04:22:09 +0000 (06:22 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 19 Sep 2020 04:18:26 +0000 (06:18 +0200)
src/language/stats/examine.c

index c17b322dd5906d374c026a2862db151c375eac33..50e55178281e3135e70b938dad6911b17f74c586 100644 (file)
@@ -135,7 +135,7 @@ struct examine
   size_t n_percentiles;
 
   unsigned int plot;
-  int sl_power;
+  float sl_power;
 
   enum bp_mode boxplot_mode;
 
@@ -1725,9 +1725,9 @@ cmd_examine (struct lexer *lexer, struct dataset *ds)
                 {
                   examine.plot |= PLOT_SPREADLEVEL;
                  examine.sl_power = 0;
-                 if (lex_match (lexer, T_LPAREN) && lex_force_int (lexer))
+                 if (lex_match (lexer, T_LPAREN) && lex_force_num (lexer))
                    {
-                      examine.sl_power = lex_integer (lexer);
+                      examine.sl_power = lex_number (lexer);
 
                       lex_get (lexer);
                       if (! lex_force_match (lexer, T_RPAREN))