X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fautorecode.c;h=dc357f7c4482496be6182c8698c53e820da24503;hb=14f4522a17db23e67a6fa17876633cc6260cb42b;hp=7c1b766750fb4319218c34a7ff8a30f47e9cc6fe;hpb=5f91f0868ec7cdbdb7900a2cb6e876b467fb2a6e;p=pspp diff --git a/src/language/stats/autorecode.c b/src/language/stats/autorecode.c index 7c1b766750..dc357f7c44 100644 --- a/src/language/stats/autorecode.c +++ b/src/language/stats/autorecode.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 1997-9, 2000, 2009, 2010, 2012, 2013 Free Software Foundation, Inc. + Copyright (C) 1997-9, 2000, 2009, 2010, 2012, 2013, 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 "data/case.h" @@ -323,7 +324,7 @@ cmd_autorecode (struct lexer *lexer, struct dataset *ds) str, src_width); } else - recoded_value = c_xasprintf ("%g", from->f); + recoded_value = c_xasprintf ("%.*g", DBL_DIG + 1, from->f); /* Remove trailing whitespace */ len = strlen (recoded_value);