gdtoa: Sync to match the latest version at netlib.org as of Nov. 02 2011. Changelog from http://netlib.org/fp/changes : Add field int_max to struct FPI and adjust gdtoa.c and *fmt.c so gdtoa.c tests against fpi->int_max rather than Int_max. This only affects some conversions by g_ffmt.c, which in some cases produced too many digits. git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@4577 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-crt/ChangeLog b/mingw-w64-crt/ChangeLog index 7f04523..74a25dd 100644 --- a/mingw-w64-crt/ChangeLog +++ b/mingw-w64-crt/ChangeLog
@@ -1,3 +1,12 @@ +2011-11-04 Ozkan Sezer <sezeroz@gmail.com> + + gdtoa: Sync to match the latest version at netlib.org as of Nov. 02 + 2011. Changelog from http://netlib.org/fp/changes : + Add field int_max to struct FPI and adjust gdtoa.c and *fmt.c + so gdtoa.c tests against fpi->int_max rather than Int_max. This + only affects some conversions by g_ffmt.c, which in some cases + produced too many digits. + 2011-11-02 Ozkan Sezer <sezeroz@gmail.com> Break stdio/asprintf.c and misc/uchar.c into pieces, one function @@ -85,7 +94,7 @@ code and prevent multiple temporary write-access settings on same section. -2011-05-26 Dongsheng Song <dongsheng@users.sourceforge.net>: +2011-05-26 Dongsheng Song <dongsheng@users.sourceforge.net> * lib32/msvcr90.def (__report_gsfailure, _assert, _byteswap_uint64, _byteswap_ulong, _byteswap_ushort, _ctime32, _decode_pointer, _difftime32, @@ -147,7 +156,7 @@ * math/pow.def.h: Use log2l/exp2l and integer/fraction separation for improving calculation precission. -2011-03-12 Dongsheng Song <dongsheng.song@gmail.com>: +2011-03-12 Dongsheng Song <dongsheng.song@gmail.com> * lib32/msvcr100.def (__report_gsfailure, _assert, _byteswap_uint64, _byteswap_ulong, _byteswap_ushort, _ctime32, _difftime32,
diff --git a/mingw-w64-crt/gdtoa/g_dfmt.c b/mingw-w64-crt/gdtoa/g_dfmt.c index 83bd636..50ed708 100644 --- a/mingw-w64-crt/gdtoa/g_dfmt.c +++ b/mingw-w64-crt/gdtoa/g_dfmt.c
@@ -33,7 +33,7 @@ char *__g_dfmt (char *buf, double *d, int ndig, size_t bufsize) { - static FPI fpi0 = { 53, 1-1023-53+1, 2046-1023-53+1, 1, 0 }; + static FPI fpi0 = { 53, 1-1023-53+1, 2046-1023-53+1, 1, 0, Int_max }; char *b, *s, *se; ULong bits[2], *L, sign; int decpt, ex, i, mode;
diff --git a/mingw-w64-crt/gdtoa/g_ffmt.c b/mingw-w64-crt/gdtoa/g_ffmt.c index 930ac07..f3f7c24 100644 --- a/mingw-w64-crt/gdtoa/g_ffmt.c +++ b/mingw-w64-crt/gdtoa/g_ffmt.c
@@ -33,7 +33,7 @@ char *__g_ffmt (char *buf, float *f, int ndig, size_t bufsize) { - static FPI fpi0 = { 24, 1-127-24+1, 254-127-24+1, 1, 0 }; + static FPI fpi0 = { 24, 1-127-24+1, 254-127-24+1, 1, 0, 6 }; char *b, *s, *se; ULong bits[1], *L, sign; int decpt, ex, i, mode;
diff --git a/mingw-w64-crt/gdtoa/g_xfmt.c b/mingw-w64-crt/gdtoa/g_xfmt.c index 7246804..da11a58 100644 --- a/mingw-w64-crt/gdtoa/g_xfmt.c +++ b/mingw-w64-crt/gdtoa/g_xfmt.c
@@ -53,7 +53,7 @@ char *__g_xfmt (char *buf, void *V, int ndig, size_t bufsize) { - static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 }; + static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0, Int_max }; char *b, *s, *se; ULong bits[2], sign; UShort *L;
diff --git a/mingw-w64-crt/gdtoa/gdtoa.c b/mingw-w64-crt/gdtoa/gdtoa.c index 3158453..cf9c290 100644 --- a/mingw-w64-crt/gdtoa/gdtoa.c +++ b/mingw-w64-crt/gdtoa/gdtoa.c
@@ -410,7 +410,7 @@ /* Do we have a "small" integer? */ - if (be >= 0 && k <= Int_max) { + if (be >= 0 && k <= fpi->int_max) { /* Yes. */ ds = tens[k]; if (ndigits < 0 && ilim <= 0) {
diff --git a/mingw-w64-crt/gdtoa/gdtoa.h b/mingw-w64-crt/gdtoa/gdtoa.h index f2d079a..c5c6f8d 100644 --- a/mingw-w64-crt/gdtoa/gdtoa.h +++ b/mingw-w64-crt/gdtoa/gdtoa.h
@@ -83,6 +83,7 @@ int emax; int rounding; int sudden_underflow; + int int_max; } FPI; enum { /* FPI.rounding values: same as FLT_ROUNDS */