[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r16669 - in /libdfp/trunk: ./ dfp/ dfp/decimal/ tests/
- To: commits@xxxxxxxxxx
- Subject: [Commits] r16669 - in /libdfp/trunk: ./ dfp/ dfp/decimal/ tests/
- From: ryanarn@xxxxxxxxxx
- Date: Fri, 13 Jan 2012 16:45:54 -0000
Author: ryanarn
Date: Fri Jan 13 16:45:53 2012
New Revision: 16669
Log:
2012-01-13 Ryan S. Arnold <rsa@xxxxxxxxxxxxxxxxxx>
* Makefile.in (libdfp_cxx_tests): Add test-ostream-g-spec test.
* tests/test-ostream-g-spec.cpp: New file to test decimal/decimal's
_LIBDFP_G_CONV_SPEC guard.
* tests/test-printf.c: Add newly discovered %DDg failures.
* tests/scaffold.c (_OSC_P): Add comment regarding
_LIBDFP_G_CONV_SPEC.
* tests/test-istream.cpp: Removed unused variable.
* README.user: Update with information about NOT using #include
<dfp/*header*>.
* dfp/float.h: Remove commented out decimal class predeclares.
* dfp/decimal/decimal: Move #include <float.h> to before #include_next
<decimal/decimal> to prevent missing _Decimal[32|64|128] definition
errors.
Added:
libdfp/trunk/tests/test-ostream-g-spec.cpp
Modified:
libdfp/trunk/ChangeLog
libdfp/trunk/Makefile.in
libdfp/trunk/README.user
libdfp/trunk/dfp/decimal/decimal
libdfp/trunk/dfp/float.h
libdfp/trunk/tests/scaffold.c
libdfp/trunk/tests/test-istream.cpp
libdfp/trunk/tests/test-printf.c
Modified: libdfp/trunk/ChangeLog
==============================================================================
--- libdfp/trunk/ChangeLog (original)
+++ libdfp/trunk/ChangeLog Fri Jan 13 16:45:53 2012
@@ -1,3 +1,19 @@
+2012-01-13 Ryan S. Arnold <rsa@xxxxxxxxxxxxxxxxxx>
+
+ * Makefile.in (libdfp_cxx_tests): Add test-ostream-g-spec test.
+ * tests/test-ostream-g-spec.cpp: New file to test decimal/decimal's
+ _LIBDFP_G_CONV_SPEC guard.
+ * tests/test-printf.c: Add newly discovered %DDg failures.
+ * tests/scaffold.c (_OSC_P): Add comment regarding
+ _LIBDFP_G_CONV_SPEC.
+ * tests/test-istream.cpp: Removed unused variable.
+ * README.user: Update with information about NOT using #include
+ <dfp/*header*>.
+ * dfp/float.h: Remove commented out decimal class predeclares.
+ * dfp/decimal/decimal: Move #include <float.h> to before #include_next
+ <decimal/decimal> to prevent missing _Decimal[32|64|128] definition
+ errors.
+
2012-01-10 Ryan S. Arnold <rsa@xxxxxxxxxxxxxxxxxx>
* Makefile.in (libdfp_cxx_tests): Added test-istream.
Modified: libdfp/trunk/Makefile.in
==============================================================================
--- libdfp/trunk/Makefile.in (original)
+++ libdfp/trunk/Makefile.in Fri Jan 13 16:45:53 2012
@@ -325,12 +325,12 @@
endif
libdfp_c_tests = test-printf test-param test-amort test-decode test-quantize \
- test-isnan test-isinf test-isfinite test-fpclassify test-logd \
- test-log10d test-strtod test-numdigits test-get_digits \
- test-round test-bfp-conversions test-stdlib test-wchar \
- test-expd
-
-libdfp_cxx_tests = test-ostream test-istream
+ test-isnan test-isinf test-isfinite test-fpclassify test-logd \
+ test-log10d test-strtod test-numdigits test-get_digits \
+ test-round test-bfp-conversions test-stdlib test-wchar \
+ test-expd
+
+libdfp_cxx_tests = test-ostream test-ostream-g-spec test-istream
libdfp_tests = $(libdfp_c_tests) $(libdfp_cxx_tests)
@@ -343,7 +343,7 @@
# need to be rebuilt.
$(addsuffix .os, $(libdfp_cxx_tests)): $(top_srcdir)/dfp/decimal/decimal $(top_srcdir)/dfp/float.h
-# Explicitly link against the uninstalled GLIBC and the Libdfp.so.1 we just
+# Explicitly link against the uninstalled GLIBC and the libdfp.so.1 we just
# built.
$(libdfp_c_tests): %:%.os $(top_builddir)/$(SHARED_SONAME_LIB)
$(CC) $(CFLAGS) $(mzarch) $(GLIBC_LIBS) -L$(top_builddir)/ -ldfp $(top_builddir)/$(addsuffix .os,$@) -o $@
Modified: libdfp/trunk/README.user
==============================================================================
--- libdfp/trunk/README.user (original)
+++ libdfp/trunk/README.user Fri Jan 13 16:45:53 2012
@@ -346,11 +346,11 @@
dfp/float.h
dfp/decimal/decimal
-Each of these headers uses the GCC construct include_next in order to pick up
+Each of these headers uses the GCC construct #include_next in order to pick up
the system header as well, e.g.,
- dfp/math.h will include_next <math.h>
- dfp/decimal/decimal will include_next <decimal/decimal>
+ dfp/math.h will #include_next <math.h>
+ dfp/decimal/decimal will #include_next <decimal/decimal>
This mechanism allows Libdfp to add the Decimal interfaces required by the
specification to the aforementioned headers.
@@ -358,36 +358,37 @@
In order to pick up the Libdfp prototypes and classification macro
overrides compile with the following:
--I/pathto/include/dfp/ -D__STDC_WANT_DEC_FP__
+ -I/pathto/include/dfp/ -D__STDC_WANT_DEC_FP__=1
Using -I instead of -isystem is suggested because -I indicates that the
specified headers are picked up BEFORE the system headers, which is what we
want.
-And then in the application source simply using the following include will
+Then in the application source simply using the following include will
pick up both /pathto/include/dfp/<foo>.h and /usr/include/<foo>.h:
-#include <math.h>
-#include <fenv.h>
-#include <stdlib.h>
-#include <wchar.h>
-
-/* And for C++ programs */
-#include <float.h>
-#include <decimal/decimal>
-
-Alternatively, if you don't want to use the -I/pathto/include/dfp/, for
-instance, if you don't want to have to specify this directly, you may do the
-following:
-
-#include <dfp/math.h>
-#include <dfp/fenv.h>
-#include <dfp/stdlib.h>
-#include <dfp/wchar.h>
-
-/* And for C++ programs */
-#include <dfp/float.h>
-#include <dfp/decimal/decimal>
+ #include <math.h>
+ #include <fenv.h>
+ #include <stdlib.h>
+ #include <wchar.h>
+
+ /* And for C++ programs */
+ #include <float.h>
+ #include <decimal/decimal>
+
+Due to the use of #include_next in the DFP headers (in order to wrap the
+default system headers with DFP prototypes) the methodology of including
+"dfp/" in the include path, and then excluding -I/pathto/include/dfp/ is
+NOT supported.
+
+DO NOT DO THE FOLLOWING:
+
+ #include <dfp/math.h>
+ #include <dfp/fenv.h>
+ #include <dfp/stdlib.h>
+ #include <dfp/wchar.h>
+ #include <dfp/float.h>
+ #include <dfp/decimal/decimal>
---------------------------------------------------------------------------
7. Compile and Link
Modified: libdfp/trunk/dfp/decimal/decimal
==============================================================================
--- libdfp/trunk/dfp/decimal/decimal (original)
+++ libdfp/trunk/dfp/decimal/decimal Fri Jan 13 16:45:53 2012
@@ -26,17 +26,23 @@
#define _LIBDFP_DECIMAL_H 1
#ifdef _GLIBCXX_DECIMAL_IMPL
-# error "<dfp/decimal> should be included before the system <decimal> header."
+# error "dfp/<decimal/decimal> should be #included before the system <decimal/decimal> header."
#endif
#ifdef __cplusplus
-/* Pick up the system <decimal> */
+/* This needs to be declared before #include_next <decimal/decimal> so that
+ * _Decimal types are declared when the system <decimal/decimal> pulls in
+ * other headers which are overloaded by libdfp, e.g., wchar.h. */
+#include <float.h> /* Pick up _Decimal[32|64|128] typedefs. */
+
+/* Pick up the system <decimal>. Since C++ DFP support is currently only a
+ * technical report the decimal header is in the non-default search path so
+ * <decimal/decimal> must be used. */
#include_next <decimal/decimal>
+using namespace std::decimal;
#pragma GCC system_header
-
-using namespace std::decimal;
#include <ostream>
using std::ostream;
@@ -44,20 +50,16 @@
#include <istream>
using std::istream;
-/* Per ISO/IEC JTC1 SC22 WG21 N2732 - TR 24733: "Extension for the programming
- * language C++ to support decimal floating point arithmetic" define the
- * ostream and istream operators. These are included in libdfp and NOT
- * libstdc++ because the ostream and istream operators rely upon libdfp
- * printf and strtod[32|64|128] support provided by libdfp. */
-
-#include <float.h> /* Pick up _Decimal[32|64|128] typedefs. */
-#include <stdio.h> /* Pick up the sprintf prototype. */
-
#include <string>
using std::string;
#include <iostream>
using namespace std;
+
+#include <stdlib.h> /* Pick up the strtod[32|64|128] prototypes. */
+#include <stdio.h> /* Pick up the sprintf prototype. */
+#include <limits.h> /* For CHAR_MAX. */
+#include <string.h> /* For memset. */
template<unsigned int size>
struct FIND_DEC_MANT_DIG
@@ -129,7 +131,35 @@
if (precision > DEC_MANT_DIG)
precision = DEC_MANT_DIG;
+ /* ISO/IEC TR 24733 (DFP C++ Technical Report) doesn't have a
+ * specific ios:: flag that matches the 'a/A' conversion specifier
+ * defined in ISO/IEC TR 24732 (DFP C Technical Report). Nor does it
+ * specify a default. It only identifies ios::fixed and
+ * ios::scientific. There is no default ios_base::fmtflags set if
+ * the user has not specified one or the other. Presumably the 'g/G'
+ * specifier would be chosen as the default since this implicitly
+ * chooses f/F or e/E based on the number encountered. */
+
+ /* This ostream implementation prefers the behavior of the DFP C TR
+ * 'a/A' conversion specifier as the default over 'g/G'. The 'a/A'
+ * conversion specifier is preferred because 'a/A' includes the
+ * number of digits left of the decimal point in the specified
+ * precision. This is important because a decimal mantissa has a
+ * fixed number of digits and there is no forced (approximate)
+ * rounding, like in binary floating point. */
+
+ /* This implementation allows one of three approaches. It can
+ * either use 'a/A' by default or it can allow the user to select
+ * 'f/F' (with ios::fixed) or 'e/E' (with ios::scientific).
+
+ /* IF the user wants 'g/G' as the default he should compile with
+ * #define _LIBDFP_G_CONV_SPEC. */
+
+#ifdef _LIBDFP_G_CONV_SPEC
+ char conv = 'g';
+#else
char conv = 'a';
+#endif
if (flags & ios::fixed)
{
@@ -148,7 +178,11 @@
conv = 'e';
}
else if (flags & ios::uppercase)
+#ifdef _LIBDFP_G_CONV_SPEC
+ conv = 'G';
+#else
conv = 'A';
+#endif
std::string fmtstr = FIND_DEC_MANT_DIG<(sizeof(decimal_type))>::get_fmt(conv);
sprintf (strbuf, fmtstr.c_str(), precision, d.__getval());
@@ -159,28 +193,17 @@
enum {DEC_MANT_DIG = FIND_DEC_MANT_DIG<(sizeof(decimal_type))>::RESULT};
};
-#include <stdlib.h> /* Pick up the strtod* prototypes */
-
-#include <limits.h> /* For CHAR_MAX */
-
-#include <istream>
-
-#include <string.h> /* For memset */
+/* Per ISO/IEC JTC1 SC22 WG21 N2732 - TR 24733: "Extension for the programming
+ * language C++ to support decimal floating point arithmetic" define the
+ * ostream and istream operators. These are included in libdfp and NOT
+ * libstdc++ because the ostream and istream operators rely upon libdfp
+ * printf and strtod[32|64|128] support provided by libdfp. */
namespace std
{
namespace decimal
{
//ISO/IEC TR 24733 - 3.2.11 Formatted output:
-
- /* ISO/IEC TR 24733 doesn't have an equivalent to the 'a/A' conversion
- * specifier in ISO/IEC TR 24732. This ostream implementation can take one
- * of three approaches. It can either use 'a/A' by default or it can allow
- * the user to select 'f/F' or 'e/E'. The 'a/A' conversion specifier is
- * preferred over 'g/G' because 'a/A' includes the number of digits left of
- * the decimal point in the specified precision. This is important because
- * a decimal mantissa has a fixed number of digits and there is no forced
- * rounding, like in binary floating point. */
template <class charT, class traits>
inline std::basic_ostream<charT, traits> &
@@ -245,7 +268,7 @@
} /* namespace std */
#else
-# warning "<dfp/decimal> should only be included by C++ programs."
+# warning "dfp/<decimal/decimal> should only be #included by C++ programs."
#endif /* __cplusplus */
#endif /* _LIBDFP_DECIMAL_H */
Modified: libdfp/trunk/dfp/float.h
==============================================================================
--- libdfp/trunk/dfp/float.h (original)
+++ libdfp/trunk/dfp/float.h Fri Jan 13 16:45:53 2012
@@ -35,11 +35,6 @@
/* If _Decimal64 is defined we don't need to do any of this. */
#ifndef _Decimal64
-/* Predeclare the decimal classes so we can typedef without errors. */
-//namespace std { namespace decimal { class decimal32; }; };
-//namespace std { namespace decimal { class decimal64; }; };
-//namespace std { namespace decimal { class decimal128; }; };
-
/* Per ISO/IEC TR 24733 the following typedefs SHOULD be defined in float.h
*
* typedef std::decimal::decimal32 _Decimal32;
@@ -50,6 +45,10 @@
* as a service if they are not defined in the system float.h.
*/
+/* Because of how these are declared in the system decimal/decimal header the
+ * declarations specified by the TR don't work. We need to define these in
+ * the same way decimal/decimal does for compatibility. */
+
typedef float _Decimal32 __attribute__((mode(SD)));
typedef float _Decimal64 __attribute__((mode(DD)));
typedef float _Decimal128 __attribute__((mode(TD)));
Modified: libdfp/trunk/tests/scaffold.c
==============================================================================
--- libdfp/trunk/tests/scaffold.c (original)
+++ libdfp/trunk/tests/scaffold.c Fri Jan 13 16:45:53 2012
@@ -69,7 +69,9 @@
flags |= ios::fixed; \
else if (spec == 'e') \
flags |= ios::scientific; \
- /* else if (spec == 'a') this is the default. */ \
+ /* else if (spec == 'a') this is the default. */ \
+ /* or else if (spec == 'g') this is the default */ \
+ /* if _LIBDFP_G_CONV_SPEC is defined. */ \
s.flags(flags); \
s << y; \
_SC_P(f,l,x,s.str().c_str()); \
Modified: libdfp/trunk/tests/test-istream.cpp
==============================================================================
--- libdfp/trunk/tests/test-istream.cpp (original)
+++ libdfp/trunk/tests/test-istream.cpp Fri Jan 13 16:45:53 2012
@@ -107,7 +107,7 @@
d32_type *d32ptr;
d64_type *d64ptr;
d128_type *d128ptr;
- int fail_save = 0;
+
for (d32ptr = istream_d32s; d32ptr->line; d32ptr++)
{
_ISC_P(__FILE__,d32ptr->line, d32ptr->expect,d32ptr->d,d32ptr->tmp,d32ptr->fmt);
Added: libdfp/trunk/tests/test-ostream-g-spec.cpp
==============================================================================
--- libdfp/trunk/tests/test-ostream-g-spec.cpp (added)
+++ libdfp/trunk/tests/test-ostream-g-spec.cpp Fri Jan 13 16:45:53 2012
@@ -1,0 +1,141 @@
+/* Test ostream operator 'g/G' spec conv in cpp compat header <dfp/decimal/decimal>.
+
+ Copyright (C) 2012 Free Software Foundation, Inc.
+
+ This file is part of the Decimal Floating Point C Library.
+
+ Author(s): Ryan S. Arnold <rsa@xxxxxxxxxx>
+
+ The Decimal Floating Point C Library is free software; you can
+ redistribute it and/or modify it under the terms of the GNU Lesser
+ General Public License version 2.1.
+
+ The Decimal Floating Point C Library is distributed in the hope that
+ it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+ the GNU Lesser General Public License version 2.1 for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License version 2.1 along with the Decimal Floating Point C Library;
+ if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+ Suite 330, Boston, MA 02111-1307 USA.
+
+ Please see libdfp/COPYING.txt for more information. */
+
+#ifndef __STDC_WANT_DEC_FP__
+#define __STDC_WANT_DEC_FP__
+#endif
+
+/* This is a CPP compatibility testcase. Pick up the _Decimal[32|64|128]
+ * definitions. */
+#include <float.h>
+
+/* This testcase sets _LIBDFP_G_CONV_SPEC which causes decimal/decimal's
+ * operator<< to default to the equivalent of an printf g/G spec conv rather
+ * than the DFP SPEC printf a/A spec conv. */
+#define _LIBDFP_G_CONV_SPEC
+#include <decimal/decimal>
+
+#include <iomanip>
+
+/* For cout support. */
+#include <iostream>
+
+using namespace std;
+using namespace std::decimal;
+
+ /* Pick up the _OSC(x,y,precision,upper,spec) macro. */
+#define _WANT_OSC 1
+#include "scaffold.c"
+
+/* Inspired by GLIBC stdio-common/tfformat.c */
+typedef struct{
+ int line;
+ decimal32 d;
+ const char *expect;
+ int precision; /* -1 means unspecified. */
+ char upper; /* l or u */
+ char spec; /* a, e, f */
+} d32_type;
+
+d32_type ostream_d32s[] =
+{
+ {__LINE__, 0.0000006E-90DF, "6e-97", -1, 'l', 'g' },
+ {__LINE__, 0.0000006E-90DF, "6E-97", -1, 'u', 'g' },
+ /* Test where specified precision '10' exceeds __DEC32_MANT_DIG__.
+ * This should reset precision to __DEC32_MANT_DIG__. */
+ {__LINE__, 0.6666666666E-90DF, "6.666667E-91", 10, 'u', 'g' },
+ {__LINE__, 0.6666666666E-90DF, "6.666667e-91", 10, 'l', 'g' },
+ {0,0,0,0,0,0}
+};
+
+typedef struct{
+ int line;
+ decimal64 d;
+ const char *expect;
+ int precision; /* -1 means unspecified. */
+ char upper; /* l or u */
+ char spec; /* a, e, f */
+} d64_type;
+
+d64_type ostream_d64s[] =
+{
+ {__LINE__, -9.999E-3DD, "-0.009999", -1, 'l', 'g' },
+ {__LINE__, -9.999E-3DD, "-0.009999", -1, 'u', 'g' },
+ {__LINE__, -9.999992E-3DD, "-0.00999999", -1, 'l', 'g' },
+ {__LINE__, __builtin_infd64(), "inf", -1, 'l', 'g' },
+ {__LINE__, __builtin_infd64(), "INF", -1, 'u', 'g' },
+ {__LINE__, (0.0DD * __builtin_infd64()), "NAN", -1, 'u', 'g' },
+ {__LINE__, (0.0DD * __builtin_infd64()), "nan", -1, 'l', 'g' },
+ {0,0,0,0,0,0}
+};
+
+typedef struct{
+ int line;
+ decimal128 d;
+ const char *expect;
+ int precision; /* -1 means unspecified. */
+ char upper; /* l or u */
+ char spec; /* a, e, f */
+} d128_type;
+
+d128_type ostream_d128s[] =
+{
+ /* Known bug in printf (not truncating). */
+ {__LINE__, -1234.56789123456789123455678DL, "-1234.57", -1, 'l', 'g' },
+ /* Known bug in printf (not truncating). */
+ {__LINE__, -1234.56789123456789123455678DL, "-1234.57", 6, 'l', 'g' },
+ /* Known bug in printf (not truncating). */
+ {__LINE__, -1234.56789123456789123455678DL, "-1234.5679", 8, 'l', 'g' },
+ {__LINE__, -12345678912345678.9123455678DL, "-1.234567891E+16", 10, 'u', 'g' },
+ {__LINE__, -12345678912345678.9123455678DL, "-1.234567891e+16", 10, 'l', 'g' },
+ {0,0,0,0,0,0}
+};
+
+int main(void)
+{
+
+ d32_type *d32ptr;
+ d64_type *d64ptr;
+ d128_type *d128ptr;
+ for (d32ptr = ostream_d32s; d32ptr->line; d32ptr++)
+ {
+ _OSC_P(__FILE__,d32ptr->line, d32ptr->expect,d32ptr->d,d32ptr->precision,d32ptr->upper,d32ptr->spec);
+ }
+
+ for (d64ptr = ostream_d64s; d64ptr->line; d64ptr++)
+ {
+ _OSC_P(__FILE__,d64ptr->line, d64ptr->expect,d64ptr->d,d64ptr->precision,d64ptr->upper,d64ptr->spec);
+ }
+
+ for (d128ptr = ostream_d128s; d128ptr->line; d128ptr++)
+ {
+ _OSC_P(__FILE__,d128ptr->line, d128ptr->expect,d128ptr->d,d128ptr->precision,d128ptr->upper,d128ptr->spec);
+ }
+
+ _REPORT();
+
+ /* fail comes from scaffold.c */
+ return fail;
+
+}
Modified: libdfp/trunk/tests/test-printf.c
==============================================================================
--- libdfp/trunk/tests/test-printf.c (original)
+++ libdfp/trunk/tests/test-printf.c Fri Jan 13 16:45:53 2012
@@ -1,6 +1,6 @@
/* Test printf_dfp facility.
- Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2009-2012 Free Software Foundation, Inc.
This file is part of the Decimal Floating Point C Library.
@@ -116,7 +116,8 @@
{__LINE__, 123.456E-9DF, "1.23456e-7", "%Ha"},
{__LINE__, 0.00000E-101DF, "0.000000e+00", "%He"},
- /* Erroneously prints "1e+6" due to the '.' with no explicit precision. */
+ /* Erroneously prints "1e+6" due to the '.' with no explicit precision. FIX
+ * ME. */
{__LINE__, 6.0E5DF, "6e+5", "%.Ha"},
{__LINE__, 0.0e10DF, "0.000000e+00", "%He"},
@@ -339,7 +340,8 @@
{__LINE__, 6.5DD, "6e+00", "%.0De"},
{__LINE__, 6.6DD, "7e+00", "%.0De"},
- /* Erroneously prints "1e+6" due to the '.' with no explicit precision. */
+ /* Erroneously prints "1e+6" due to the '.' with no explicit precision. Fix
+ * ME. */
{__LINE__, 6.0E5DD, "6e+5", "%.Da"},
{__LINE__, 123.456E-9DD, "1.23456e-7", "%Da"},
@@ -563,7 +565,8 @@
{__LINE__, 6.5DL, "6e+00", "%.0DDe"},
{__LINE__, 6.6DL, "7e+00", "%.0DDe"},
- /* Erroneously prints "1e+6" due to the '.' with no explicit precision. */
+ /* Erroneously prints "1e+6" due to the '.' with no explicit precision. FIX
+ * ME. */
{__LINE__, 6.0E5DL, "6e+5", "%.DDa"},
{__LINE__, 123.456E-9DL, "1.23456e-7", "%DDa"},
@@ -707,7 +710,7 @@
{__LINE__, 6543.00DL, "7e+3", "%.1DDa"},
{__LINE__, 6543.00DL, "7E+3", "%.1DDA"},
- {__LINE__, 6543.00DL, " 6543.00", "%8DDa"},
+ {__LINE__, 6543.00DL, "6543.00", "%.8DDa"},
/* Fixed by Andreas Schwab on 2010-20-04 */
{__LINE__, 0.9999999999DL, "1.000000", "%DDf"},
@@ -716,6 +719,14 @@
* It was fixed by Andreas Krebbel on 2011-01-18 */
{__LINE__, (1.0DL / 1.000000e-123DL), "1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000", "%DDf"},
+ {__LINE__, -1234.56789123456789123455678DL, "-1234.56789123", "%.8DDf"},
+ /* This should be the same as %.8DDf. FIX ME. */
+ {__LINE__, -1234.56789123456789123455678DL, "-1234.56789123", "%.8DDg"},
+ /* This isn't properly rounding after the truncated. FIX ME. */
+ {__LINE__, -1234.56789123456789123455678DL, "-1234.57", "%DDg"},
+ {__LINE__, -1234.56789123456789123455678DL, "-1234.5679", "%.8DDa"},
+ {__LINE__, -1234.56789123456789123455678DL, "-1.234568e+03", "%.6DDe"},
+ {__LINE__, -1234.56789123456789123455678DL, "-1.23456789e+03", "%.8DDe"},
{0,0,0,0 }
};
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits