Commit 8320f8c8 authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder

New stuff.

2002-02-19  Morten Welinder  <terra@diku.dk>

	* src/numbers.h (modfgnum, strtgnum, GNUM_FORMAT_[eEfg],
 	GNUM_DIG): New stuff.

  	* .../*.[cy]: All relevant strtod changed to strtognum; modf to
 	modfgnum; DBL_DIG to GNUM_DIG; formats changed to use
 	GNUM_FORMAT_...

	* src/gutils.c (strtognum): If needed, define a version here.

	* src/complex.c (complex_to_string): Use right format for
 	imaginary part.

	* configure.in: Add support for --with-long-double.

	* acconfig.h: Add WITH_LONG_DOUBLE.
parent 95081efd
2002-02-19 Morten Welinder <terra@diku.dk>
* src/numbers.h (modfgnum, strtgnum, GNUM_FORMAT_[eEfg],
GNUM_DIG): New stuff.
* .../*.[cy]: All relevant strtod changed to strtognum; modf to
modfgnum; DBL_DIG to GNUM_DIG; formats changed to use
GNUM_FORMAT_...
* src/gutils.c (strtognum): If needed, define a version here.
* src/complex.c (complex_to_string): Use right format for
imaginary part.
* configure.in: Add support for --with-long-double.
* acconfig.h: Add WITH_LONG_DOUBLE.
2002-02-19 Jody Goldberg <jody@gnome.org> 2002-02-19 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=69362 http://bugzilla.gnome.org/show_bug.cgi?id=69362
......
...@@ -51,6 +51,7 @@ Morten: ...@@ -51,6 +51,7 @@ Morten:
* Fix validation's use of abs to be fabs. * Fix validation's use of abs to be fabs.
* Improve random number generation using /dev/urandom device. * Improve random number generation using /dev/urandom device.
* Fix Oleo plugin's isdigit usage. * Fix Oleo plugin's isdigit usage.
* Support for --with-long-double
-------------------------------------------------------------------------- --------------------------------------------------------------------------
Gnumeric 1.0.3 Gnumeric 1.0.3
......
2002-02-19 Morten Welinder <terra@diku.dk>
* src/numbers.h (modfgnum, strtgnum, GNUM_FORMAT_[eEfg],
GNUM_DIG): New stuff.
* .../*.[cy]: All relevant strtod changed to strtognum; modf to
modfgnum; DBL_DIG to GNUM_DIG; formats changed to use
GNUM_FORMAT_...
* src/gutils.c (strtognum): If needed, define a version here.
* src/complex.c (complex_to_string): Use right format for
imaginary part.
* configure.in: Add support for --with-long-double.
* acconfig.h: Add WITH_LONG_DOUBLE.
2002-02-19 Jody Goldberg <jody@gnome.org> 2002-02-19 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=69362 http://bugzilla.gnome.org/show_bug.cgi?id=69362
......
2002-02-19 Morten Welinder <terra@diku.dk>
* src/numbers.h (modfgnum, strtgnum, GNUM_FORMAT_[eEfg],
GNUM_DIG): New stuff.
* .../*.[cy]: All relevant strtod changed to strtognum; modf to
modfgnum; DBL_DIG to GNUM_DIG; formats changed to use
GNUM_FORMAT_...
* src/gutils.c (strtognum): If needed, define a version here.
* src/complex.c (complex_to_string): Use right format for
imaginary part.
* configure.in: Add support for --with-long-double.
* acconfig.h: Add WITH_LONG_DOUBLE.
2002-02-19 Jody Goldberg <jody@gnome.org> 2002-02-19 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=69362 http://bugzilla.gnome.org/show_bug.cgi?id=69362
......
...@@ -22,5 +22,6 @@ ...@@ -22,5 +22,6 @@
#undef ENABLE_GNOME #undef ENABLE_GNOME
#undef HAVE_PSPELL #undef HAVE_PSPELL
#undef ENABLE_EVOLUTION #undef ENABLE_EVOLUTION
#undef WITH_LONG_DOUBLE
@BOTTOM@ @BOTTOM@
...@@ -63,6 +63,37 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then ...@@ -63,6 +63,37 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
unset option unset option
fi fi
float_msg=double
have_ld=no
AC_ARG_WITH(long_double,
[--{with,without}-long-double Use long double for floating point],
[if test "x$withval" = xyes; then
AC_C_LONG_DOUBLE
if test "$ac_cv_c_long_double" != "yes"; then
AC_MSG_ERROR([Long double type is not available.])
fi
AC_CHECK_FUNCS(strtold modfl string_to_decimal decimal_to_quadruple)
AC_CHECK_HEADERS(floatingpoint.h)
if test "$ac_cv_func_strtold" = "yes"; then
true
elif test "$ac_cv_func_string_to_decimal" = "yes" -a \
"$ac_cv_func_decimal_to_quadruple" = "yes" -a \
"$ac_cv_header_floatingpoint_h" = "yes"; then
true
else
AC_MSG_WARN([You lack the strtold function -- precision will be impaired])
fi
if test "$ac_cv_func_modfl" != "yes"; then
AC_MSG_WARN([You lack the modfl function -- precision will be impaired])
fi
float_msg="long double (EXPERIMENTAL)"
AC_MSG_WARN([Long double support is experimental -- expect problems])
AC_DEFINE(WITH_LONG_DOUBLE)
fi]
)
dnl **************************** dnl ****************************
dnl MS Excel (tm) Plugin dnl MS Excel (tm) Plugin
dnl **************************** dnl ****************************
...@@ -541,9 +572,10 @@ WARNING WARNING WARNING ...@@ -541,9 +572,10 @@ WARNING WARNING WARNING
Configuration: Configuration:
Source code location: ${srcdir} Source code location: ${srcdir}
Compiler: ${CC} Compiler: ${CC}
Floating point type: ${float_msg}
MS Excel Support : ${excel_msg} MS Excel Support: ${excel_msg}
GDA support: ${gda_msg} GDA support: ${gda_msg}
GB support: ${gb_msg} GB support: ${gb_msg}
......
...@@ -561,9 +561,9 @@ value_new_complex (const complex_t *c, char imunit) ...@@ -561,9 +561,9 @@ value_new_complex (const complex_t *c, char imunit)
if (complex_real_p (c)) if (complex_real_p (c))
return value_new_float (c->re); return value_new_float (c->re);
else { else {
char *s, f[5 + 4 * sizeof (int)]; char *s, f[5 + 4 * sizeof (int) + strlen (GNUM_FORMAT_g)];
Value *res; Value *res;
sprintf (f, "%%.%dg", DBL_DIG); sprintf (f, "%%.%d" GNUM_FORMAT_g, GNUM_DIG);
s = complex_to_string (c, f, f, imunit); s = complex_to_string (c, f, f, imunit);
res = value_new_string (s); res = value_new_string (s);
g_free (s); g_free (s);
......
...@@ -44,7 +44,7 @@ complex_to_string (const complex_t *src, const char *reformat, ...@@ -44,7 +44,7 @@ complex_to_string (const complex_t *src, const char *reformat,
} else if (src->im == -1) { } else if (src->im == -1) {
sign = "-"; sign = "-";
} else { } else {
im_buffer = g_strdup_printf (reformat, src->im); im_buffer = g_strdup_printf (imformat, src->im);
if (re_buffer && *im_buffer != '-' && *im_buffer != '+') if (re_buffer && *im_buffer != '-' && *im_buffer != '+')
sign = (src->im >= 0) ? "+" : "-"; sign = (src->im >= 0) ? "+" : "-";
} }
...@@ -95,7 +95,7 @@ complex_from_string (complex_t *dst, const char *src, char *imunit) ...@@ -95,7 +95,7 @@ complex_from_string (complex_t *dst, const char *src, char *imunit)
} }
errno = 0; errno = 0;
x = strtod (src, &end); x = strtognum (src, &end);
if (src == end || errno == ERANGE) if (src == end || errno == ERANGE)
return -1; return -1;
src = end; src = end;
...@@ -120,7 +120,7 @@ complex_from_string (complex_t *dst, const char *src, char *imunit) ...@@ -120,7 +120,7 @@ complex_from_string (complex_t *dst, const char *src, char *imunit)
return 0; return 0;
} }
y = strtod (src, &end); y = strtognum (src, &end);
if (src == end || errno == ERANGE) if (src == end || errno == ERANGE)
return -1; return -1;
src = end; src = end;
......
...@@ -71,7 +71,7 @@ format_get_decimal (void) ...@@ -71,7 +71,7 @@ format_get_decimal (void)
if (lc == NULL) if (lc == NULL)
lc = localeconv (); lc = localeconv ();
/* NOTE : Use decimal_point _not_ mon_decimal_point. strtod uses this /* NOTE : Use decimal_point _not_ mon_decimal_point. strtognum uses this
* and we get very confused when they are different (eg ru_RU) * and we get very confused when they are different (eg ru_RU)
*/ */
res = lc->decimal_point[0]; res = lc->decimal_point[0];
...@@ -490,7 +490,7 @@ format_compile (StyleFormat *format) ...@@ -490,7 +490,7 @@ format_compile (StyleFormat *format)
/* fall back on 0 for errors */ /* fall back on 0 for errors */
errno = 0; errno = 0;
entry->restriction_value = strtod (begin, (char **)&end); entry->restriction_value = strtognum (begin, (char **)&end);
if (errno == ERANGE || begin == end) if (errno == ERANGE || begin == end)
entry->restriction_value = 0.; entry->restriction_value = 0.;
break; break;
...@@ -667,7 +667,7 @@ render_number (GString *result, ...@@ -667,7 +667,7 @@ render_number (GString *result,
gnum_float delta = 5 * gpow10 (-right_allowed - 1); gnum_float delta = 5 * gpow10 (-right_allowed - 1);
number += delta; number += delta;
} }
frac_part = modf (gnumeric_add_epsilon (number), &int_part); frac_part = modfgnum (gnumeric_add_epsilon (number), &int_part);
*num = '\0'; *num = '\0';
group = (info->group_thousands) ? 3 : -1; group = (info->group_thousands) ? 3 : -1;
...@@ -1084,7 +1084,7 @@ format_number (gnum_float number, int col_width, StyleFormatEntry const *entry) ...@@ -1084,7 +1084,7 @@ format_number (gnum_float number, int col_width, StyleFormatEntry const *entry)
else else
break; break;
sprintf (buffer, is_lower ? "%s%.*e" : "%s%.*E", sprintf (buffer, is_lower ? "%s%.*" GNUM_FORMAT_e : "%s%.*E" GNUM_FORMAT_E,
info.negative ? "-" : info.negative ? "-" :
shows_plus ? "+" : "", shows_plus ? "+" : "",
prec, number); prec, number);
...@@ -1418,7 +1418,7 @@ fmt_general_float (gnum_float val, float col_width) ...@@ -1418,7 +1418,7 @@ fmt_general_float (gnum_float val, float col_width)
int log_val, prec; int log_val, prec;
if (col_width < 0.) if (col_width < 0.)
return g_strdup_printf ("%.*g", DBL_DIG, val); return g_strdup_printf ("%.*" GNUM_FORMAT_g, GNUM_DIG, val);
if (val < 0.) { if (val < 0.) {
/* leave space for minus sign */ /* leave space for minus sign */
...@@ -1460,11 +1460,11 @@ fmt_general_float (gnum_float val, float col_width) ...@@ -1460,11 +1460,11 @@ fmt_general_float (gnum_float val, float col_width)
if (prec < 1) if (prec < 1)
prec = 1; prec = 1;
else if (prec > DBL_DIG) else if (prec > GNUM_DIG)
prec = DBL_DIG; prec = GNUM_DIG;
/* FIXME : glib bug. it does not handle G, use g (fixed in 1.2.9) */ /* FIXME : glib bug. it does not handle G, use g (fixed in 1.2.9) */
return g_strdup_printf ("%.*g", prec, val); return g_strdup_printf ("%.*" GNUM_FORMAT_g, prec, val);
} }
/** /**
...@@ -1490,7 +1490,7 @@ fmt_general_int (int val, int col_width) ...@@ -1490,7 +1490,7 @@ fmt_general_int (int val, int col_width)
if (log_val > col_width) if (log_val > col_width)
/* FIXME : glib bug. it does not handle G, use g */ /* FIXME : glib bug. it does not handle G, use g */
/* Decrease available width by 5 to account for .+E00 */ /* Decrease available width by 5 to account for .+E00 */
return g_strdup_printf ("%.*g", col_width - 5, (double)val); return g_strdup_printf ("%.*" GNUM_FORMAT_g, col_width - 5, (double)val);
} }
return g_strdup_printf ("%d", val); return g_strdup_printf ("%d", val);
} }
...@@ -1597,7 +1597,7 @@ number_format_init (void) ...@@ -1597,7 +1597,7 @@ number_format_init (void)
{ {
style_format_hash = g_hash_table_new (g_str_hash, g_str_equal); style_format_hash = g_hash_table_new (g_str_hash, g_str_equal);
/* FIXME: should be related to gnum_float, not double: */ /* FIXME: should be related to gnum_float, not double: */
beyond_precision = gpow10 (DBL_DIG + 1); beyond_precision = gpow10 (GNUM_DIG + 1);
} }
void void
......
...@@ -561,9 +561,9 @@ value_new_complex (const complex_t *c, char imunit) ...@@ -561,9 +561,9 @@ value_new_complex (const complex_t *c, char imunit)
if (complex_real_p (c)) if (complex_real_p (c))
return value_new_float (c->re); return value_new_float (c->re);
else { else {
char *s, f[5 + 4 * sizeof (int)]; char *s, f[5 + 4 * sizeof (int) + strlen (GNUM_FORMAT_g)];
Value *res; Value *res;
sprintf (f, "%%.%dg", DBL_DIG); sprintf (f, "%%.%d" GNUM_FORMAT_g, GNUM_DIG);
s = complex_to_string (c, f, f, imunit); s = complex_to_string (c, f, f, imunit);
res = value_new_string (s); res = value_new_string (s);
g_free (s); g_free (s);
......
...@@ -184,8 +184,8 @@ goal_seek_newton (GoalSeekFunction f, GoalSeekFunction df, ...@@ -184,8 +184,8 @@ goal_seek_newton (GoalSeekFunction f, GoalSeekFunction df,
return status; return status;
#ifdef DEBUG_GOAL_SEEK #ifdef DEBUG_GOAL_SEEK
printf ("x0 = %.20g\n", x0); printf ("x0 = %.20" GNUM_FORMAT_g "\n", x0);
printf (" y0 = %.20g\n", y0); printf (" y0 = %.20" GNUM_FORMAT_g "\n", y0);
#endif #endif
if (update_data (x0, y0, data)) if (update_data (x0, y0, data))
...@@ -223,8 +223,8 @@ goal_seek_newton (GoalSeekFunction f, GoalSeekFunction df, ...@@ -223,8 +223,8 @@ goal_seek_newton (GoalSeekFunction f, GoalSeekFunction df,
stepsize = fabs (x1 - x0) / (fabs (x0) + fabs (x1)); stepsize = fabs (x1 - x0) / (fabs (x0) + fabs (x1));
#ifdef DEBUG_GOAL_SEEK #ifdef DEBUG_GOAL_SEEK
printf (" df0 = %.20g\n", df0); printf (" df0 = %.20" GNUM_FORMAT_g "\n", df0);
printf (" ss = %.20g\n", stepsize); printf (" ss = %.20" GNUM_FORMAT_g "\n", stepsize);
#endif #endif
x0 = x1; x0 = x1;
...@@ -272,7 +272,7 @@ goal_seek_bisection (GoalSeekFunction f, GoalSeekData *data, void *user_data) ...@@ -272,7 +272,7 @@ goal_seek_bisection (GoalSeekFunction f, GoalSeekData *data, void *user_data)
/ (fabs (data->xpos) + fabs (data->xneg)); / (fabs (data->xpos) + fabs (data->xneg));
/* log_2 (10) = 3.3219 < 4. */ /* log_2 (10) = 3.3219 < 4. */
for (iterations = 0; iterations < 100 + DBL_DIG * 4; iterations++) { for (iterations = 0; iterations < 100 + GNUM_DIG * 4; iterations++) {
gnum_float xmid, ymid; gnum_float xmid, ymid;
GoalSeekStatus status; GoalSeekStatus status;
enum { M_SECANT, M_RIDDER, M_NEWTON, M_MIDPOINT } method; enum { M_SECANT, M_RIDDER, M_NEWTON, M_MIDPOINT } method;
...@@ -376,8 +376,8 @@ goal_seek_bisection (GoalSeekFunction f, GoalSeekData *data, void *user_data) ...@@ -376,8 +376,8 @@ goal_seek_bisection (GoalSeekFunction f, GoalSeekData *data, void *user_data)
default: themethod = "?"; default: themethod = "?";
} }
printf ("xmid = %.20g (%s)\n", xmid, themethod); printf ("xmid = %.20" GNUM_FORMAT_g " (%s)\n", xmid, themethod);
printf (" ymid = %.20g\n", ymid); printf (" ymid = %.20" GNUM_FORMAT_g "\n", ymid);
} }
#endif #endif
...@@ -389,7 +389,7 @@ goal_seek_bisection (GoalSeekFunction f, GoalSeekData *data, void *user_data) ...@@ -389,7 +389,7 @@ goal_seek_bisection (GoalSeekFunction f, GoalSeekData *data, void *user_data)
/ (fabs (data->xpos) + fabs (data->xneg)); / (fabs (data->xpos) + fabs (data->xneg));
#ifdef DEBUG_GOAL_SEEK #ifdef DEBUG_GOAL_SEEK
printf (" ss = %.20g\n", stepsize); printf (" ss = %.20" GNUM_FORMAT_g "\n", stepsize);
#endif #endif
if (stepsize < data->precision) { if (stepsize < data->precision) {
...@@ -434,8 +434,8 @@ goal_seek_trawl_uniformly (GoalSeekFunction f, ...@@ -434,8 +434,8 @@ goal_seek_trawl_uniformly (GoalSeekFunction f,
continue; continue;
#ifdef DEBUG_GOAL_SEEK #ifdef DEBUG_GOAL_SEEK
printf ("x = %.20g\n", x); printf ("x = %.20" GNUM_FORMAT_g "\n", x);
printf (" y = %.20g\n", y); printf (" y = %.20" GNUM_FORMAT_g "\n", y);
#endif #endif
if (update_data (x, y, data)) if (update_data (x, y, data))
...@@ -475,8 +475,8 @@ goal_seek_trawl_normally (GoalSeekFunction f, ...@@ -475,8 +475,8 @@ goal_seek_trawl_normally (GoalSeekFunction f,
continue; continue;
#ifdef DEBUG_GOAL_SEEK #ifdef DEBUG_GOAL_SEEK
printf ("x = %.20g\n", x); printf ("x = %.20" GNUM_FORMAT_g "\n", x);
printf (" y = %.20g\n", y); printf (" y = %.20" GNUM_FORMAT_g "\n", y);
#endif #endif
if (update_data (x, y, data)) if (update_data (x, y, data))
......
...@@ -59,7 +59,7 @@ x_selection_to_cell_region (WorkbookControlGUI *wbcg, const guchar *src, int len ...@@ -59,7 +59,7 @@ x_selection_to_cell_region (WorkbookControlGUI *wbcg, const guchar *src, int len
char *message; char *message;
message = g_strdup_printf (_("The data on the clipboard does not seem to be valid text.\nThe character '%c' (ASCII decimal %d) was encountered.\nMost likely your locale settings are wrong."), message = g_strdup_printf (_("The data on the clipboard does not seem to be valid text.\nThe character '%c' (ASCII decimal %d) was encountered.\nMost likely your locale settings are wrong."),
*c, (int) *c); *c, (int) ((unsigned char)*c));
g_warning (message); g_warning (message);
g_free (message); g_free (message);
......
...@@ -25,6 +25,9 @@ ...@@ -25,6 +25,9 @@
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <gal/util/e-util.h> #include <gal/util/e-util.h>
#ifdef HAVE_FLOATINGPOINT_H
#include <floatingpoint.h>
#endif
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
...@@ -546,3 +549,60 @@ gnumeric_strescape (const char *string) ...@@ -546,3 +549,60 @@ gnumeric_strescape (const char *string)
} }
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
#ifdef NEED_FAKE_MODFL
gnum_float
fake_modfl (gnum_float x, gnum_float *iptr)
{
double di;
gnum_float res;
res = modf (x, &di);
*iptr = di;
return res;
}
#endif
/* ------------------------------------------------------------------------- */
#if defined(WITH_LONG_DOUBLE) && !defined(HAVE_STRTOLD)
gnum_float
strtognum (const char *str, char **end)
{
gnum_float res;
#if defined(HAVE_STRING_TO_DECIMAL) && defined(HAVE_DECIMAL_TO_QUADRUPLE)
decimal_record dr;
enum decimal_string_form form;
decimal_mode dm;
fp_exception_field_type excp;
char *echar;
string_to_decimal ((char **)&str, strlen (str),
0, &dr, &form, &echar);
if (end) *end = (char *)str;
if (form == invalid_form) {
errno = EINVAL;
return 0.0;
}
dm.rd = fp_nearest;
dm.df = floating_form;
dm.ndigits = GNUM_DIG;
decimal_to_quadruple (&res, &dm, &dr, &excp);
#else
static gboolean warned = FALSE;
if (!warned) {
warned = TRUE;
g_warning (_("This version of Gnumeric has been compiled with inadequate precision in strtognum."));
}
res = strtod (str, end);
#endif
return res;
}
#endif
/* ------------------------------------------------------------------------- */
...@@ -83,4 +83,12 @@ void gnumeric_set_le_double (void *p, double d); ...@@ -83,4 +83,12 @@ void gnumeric_set_le_double (void *p, double d);
char * gnumeric_strescape (const char *string); char * gnumeric_strescape (const char *string);
#ifdef NEED_FAKE_MODFL
gnum_float fake_modfl (gnum_float x, gnum_float *iptr);
#endif
#if defined(WITH_LONG_DOUBLE) && !defined(HAVE_STRTOLD)
gnum_float strtognum (const char *str, char **end);
#endif
#endif /* GNUMERIC_UTILS_H */ #endif /* GNUMERIC_UTILS_H */
...@@ -860,7 +860,7 @@ compute_value (char const *s, const regmatch_t *mp, ...@@ -860,7 +860,7 @@ compute_value (char const *s, const regmatch_t *mp,
char *exppart = NULL; char *exppart = NULL;
if (*str == decimal) { if (*str == decimal) {
char *end; char *end;
errno = 0; /* strtod sets errno, but does not clear it. */ errno = 0; /* strtognum sets errno, but does not clear it. */
if (seconds < 0) { if (seconds < 0) {
gnum_float fraction; gnum_float fraction;
...@@ -871,14 +871,14 @@ compute_value (char const *s, const regmatch_t *mp, ...@@ -871,14 +871,14 @@ compute_value (char const *s, const regmatch_t *mp,
*end = 0; *end = 0;
} }
fraction = strtod (str, &end); fraction = strtognum (str, &end);
if (is_neg) if (is_neg)
number -= fraction; number -= fraction;
else else
number += fraction; number += fraction;
is_number = TRUE; is_number = TRUE;
} else } else
seconds += strtod (str, &end); seconds += strtognum (str, &end);
} }
if (exppart) { if (exppart) {
char *end; char *end;
...@@ -1094,16 +1094,16 @@ format_match_simple (char const *text) ...@@ -1094,16 +1094,16 @@ format_match_simple (char const *text)
/* Is it a double? */ /* Is it a double? */
{ {
char *end; char *end;
double d; gnum_float d;
errno = 0; /* strtod sets errno, but does not clear it. */ errno = 0; /* strtognum sets errno, but does not clear it. */
d = strtod (text, &end); d = strtognum (text, &end);
if (text != end && errno != ERANGE && d == (gnum_float)d) { if (text != end && errno != ERANGE) {
/* Allow and ignore spaces at the end. */ /* Allow and ignore spaces at the end. */
while (*end == ' ') while (*end == ' ')
end++; end++;
if (*end == '\0') if (*end == '\0')
return value_new_float ((gnum_float)d); return value_new_float (d);
} }
} }
......
#ifndef GNUMERIC_NUMBERS_H #ifndef GNUMERIC_NUMBERS_H
#define GNUMERIC_NUMBERS_H #define GNUMERIC_NUMBERS_H
typedef double gnum_float;
typedef int gnum_int; typedef int gnum_int;
#ifdef WITH_LONG_DOUBLE
typedef long double gnum_float;
#ifdef HAVE_STRTOLD
#define strtognum strtold
#else
/* Defined in gutils.h */
#endif
#ifdef HAVE_MODFL
#define modfgnum modfl
#else
#define NEED_FAKE_MODFL