Change many %g format specifiers to %.*g with precision DBL_DIG + 1.
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 4 Feb 2014 05:37:53 +0000 (21:37 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 4 Feb 2014 05:37:53 +0000 (21:37 -0800)
commit14f4522a17db23e67a6fa17876633cc6260cb42b
treea73bc0b433e6c625dd3f8d997c3b9414fb8575ba
parent5f91f0868ec7cdbdb7900a2cb6e876b467fb2a6e
Change many %g format specifiers to %.*g with precision DBL_DIG + 1.

The high precision should ensure that in most cases the value is formatted
with enough digits to fully express the internal precision.  Without this
change, %g by itself only expresses 6 digits of precision, so that an
integer value like 99999999 is formatted as 1e8.  This fixes the problem.

This commit adds a test to MISSING VALUES because this was in particular
reported as a problem.

Thanks to Andre Müller <Andre.Mueller@gesis.org> for reporting this issue.
28 files changed:
src/language/dictionary/sys-file-info.c
src/language/lexer/value-parser.c
src/language/stats/autorecode.c
src/language/stats/binomial.c
src/language/stats/cochran.c
src/language/stats/crosstabs.q
src/language/stats/descriptives.c
src/language/stats/oneway.c
src/language/stats/regression.c
src/language/stats/runs.c
src/language/utilities/set.q
src/language/xforms/compute.c
src/math/categoricals.c
src/output/cairo-chart.c
src/output/charts/plot-hist-cairo.c
src/ui/gui/aggregate-dialog.c
src/ui/gui/psppire-dialog-action-binomial.c
src/ui/gui/psppire-dialog-action-chisquare.c
src/ui/gui/psppire-dialog-action-factor.c
src/ui/gui/psppire-dialog-action-logistic.c
src/ui/gui/psppire-dialog-action-oneway.c
src/ui/gui/psppire-val-chooser.c
src/ui/gui/recode-dialog.c
src/ui/gui/select-cases-dialog.c
src/ui/gui/spreadsheet-test.c
tests/data/datasheet-test.c
tests/language/dictionary/missing-values.at
utilities/pspp-dump-sav.c