X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fdescriptives.c;h=f80965616f0c1f5fc29b04a9a788440d8471f676;hb=14f4522a17db23e67a6fa17876633cc6260cb42b;hp=413826cc9cdaa64c7e9b10d503f80ceae15dc57c;hpb=5f91f0868ec7cdbdb7900a2cb6e876b467fb2a6e;p=pspp diff --git a/src/language/stats/descriptives.c b/src/language/stats/descriptives.c index 413826cc9c..f80965616f 100644 --- a/src/language/stats/descriptives.c +++ b/src/language/stats/descriptives.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 1997-2000, 2009-2013 Free Software Foundation, Inc. + Copyright (C) 1997-2000, 2009-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,6 +16,7 @@ #include +#include #include #include #include @@ -1002,17 +1003,18 @@ display (struct dsc_proc *dsc) nc = 0; tab_text (t, nc++, i + 1, TAB_LEFT, var_to_string (dv->v)); - tab_text_format (t, nc++, i + 1, 0, "%g", dv->valid); + tab_text_format (t, nc++, i + 1, 0, "%.*g", DBL_DIG + 1, dv->valid); if (dsc->format == DSC_SERIAL) - tab_text_format (t, nc++, i + 1, 0, "%g", dv->missing); + tab_text_format (t, nc++, i + 1, 0, "%.*g", DBL_DIG + 1, dv->missing); for (j = 0; j < DSC_N_STATS; j++) if (dsc->show_stats & (1ul << j)) tab_double (t, nc++, i + 1, TAB_NONE, dv->stats[j], NULL); } - tab_title (t, _("Valid cases = %g; cases with missing value(s) = %g."), - dsc->valid, dsc->missing_listwise); + tab_title (t, _("Valid cases = %.*g; cases with missing value(s) = %.*g."), + DBL_DIG + 1, dsc->valid, + DBL_DIG + 1, dsc->missing_listwise); tab_submit (t); }