+2007-11-02 Ben Pfaff <blp@gnu.org>
+
+ * Smake (GNULIB_MODULES): Add isfinite, round modules.
+
2007-10-12 Ben Pfaff <blp@gnu.org>
Use trunc module from gnulib instead of our home-grown solution.
+2007-11-02 Ben Pfaff <blp@gnu.org>
+
+ * data-out.c (output_number): Use isfinite (from C99) instead of
+ gsl_isfinite, since we now have universal support for it in
+ gnulib.
+ (output_infinite): Ditto.
+ [!HAVE_ROUND] (round): Remove definition, since we now have a
+ replacement in gnulib.
+
2007-10-27 John Darrington <john@darrington.wattle.id.au>
* dictionary.c: Fixed bug in dict_clone, where the vardict.dict member
#include <stdint.h>
#include <stdlib.h>
#include <time.h>
-#include <gsl/gsl_math.h>
#include "calendar.h"
#include "format.h"
if (number == SYSMIS)
output_missing (format, output);
- else if (!gsl_finite (number))
+ else if (!isfinite (number))
output_infinite (number, format, output);
else
{
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. */
static void
output_infinite (double number, const struct fmt_spec *format, char *output)
{
- assert (!gsl_finite (number));
+ assert (!isfinite (number));
if (format->w >= 3)
{