This is the mail archive of the
mailing list for the GCC project.
Re: [gfortran] I/O of large integer and real kinds
- From: FX Coudert <fxcoudert at gmail dot com>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: patch <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Tue, 07 Jun 2005 21:55:30 +0200
- Subject: Re: [gfortran] I/O of large integer and real kinds
- References: <42A4C151.firstname.lastname@example.org> <20050607194658.GA43300@troutmask.apl.washington.edu>
+#if defined (HAVE_GFC_REAL_10) || defined (HAVE_GFC_REAL_16)
+# if HAVE_LOG10L || HAVE_LOG10L_IN_LIBSUNMATH
+ abslog = fabs(log10l (value));
No need for that. fabsl is not available on some platforms, and the case
where the exponent of a value does not fit into a double... well, let's
say it won't occur often enough to justify the extra trouble.
Perhaps it is better to write the case explicitly?
abslog = fabs ((double) log10l (value));
+ sprintf (buffer, "%+-#31.*" GFC_REAL_LARGEST_FORMAT "e",
+ ndigits - 1, value);
In the case of long double, do we need to "Le" instead of "e"?
Shouldn't this be someting like
#if (HAVE_GFC_REAL_10 || HAVE_GFC_REAL_16)
# if HAVE_FINITEL
res = finitel (n);
res = gfc_finitel (n); /* a builtin or we supply in c99_functions.c */
Yes, provided someone can write gfc_finitel in short time. Other than
that, using isfinite (and the implicit cast to double if need be)
provides a graceful degradation, I think.
- uint64_t n = 0;
+//FXC uint32_t ns =0;
Sorry for these. Will be removed in next version of the patch.