projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use isfinite, round modules from gnulib.
[pspp-builds.git]
/
src
/
data
/
data-out.c
diff --git
a/src/data/data-out.c
b/src/data/data-out.c
index 8091cefd6e5215c462ff98e82bc5b234b7ce1151..967f57eddc23bf2090360032d26fb20417b01728 100644
(file)
--- a/
src/data/data-out.c
+++ b/
src/data/data-out.c
@@
-24,7
+24,6
@@
#include <stdint.h>
#include <stdlib.h>
#include <time.h>
#include <stdint.h>
#include <stdlib.h>
#include <time.h>
-#include <gsl/gsl_math.h>
#include "calendar.h"
#include "format.h"
#include "calendar.h"
#include "format.h"
@@
-150,7
+149,7
@@
output_number (const union value *input, const struct fmt_spec *format,
if (number == SYSMIS)
output_missing (format, output);
if (number == SYSMIS)
output_missing (format, output);
- else if (!
gsl_
finite (number))
+ else if (!
is
finite (number))
output_infinite (number, format, output);
else
{
output_infinite (number, format, output);
else
{
@@
-710,16
+709,6
@@
output_scientific (double number, const struct fmt_spec *format,
return true;
}
\f
return true;
}
\f
-#ifndef HAVE_ROUND
-/* Return X rounded to the nearest integer,
- rounding ties away from zero. */
-static double
-round (double x)
-{
- return x >= 0.0 ? floor (x + .5) : ceil (x - .5);
-}
-#endif /* !HAVE_ROUND */
-
/* Returns true if the magnitude represented by R should be
rounded up when chopped off at DECIMALS decimal places, false
if it should be rounded down. */
/* Returns true if the magnitude represented by R should be
rounded up when chopped off at DECIMALS decimal places, false
if it should be rounded down. */
@@
-948,7
+937,7
@@
power256 (int x)
static void
output_infinite (double number, const struct fmt_spec *format, char *output)
{
static void
output_infinite (double number, const struct fmt_spec *format, char *output)
{
- assert (!
gsl_
finite (number));
+ assert (!
is
finite (number));
if (format->w >= 3)
{
if (format->w >= 3)
{