* mingwex/gdtoa/misc.c (pow5mult): Restore original code.
* mingwex/gdtoa/gdtoa.h. Add comment that files have been modified. * mingwex/gdtoa/gdtoaimp.h: Include system headers with <> brackets.
This commit is contained in:
parent
d39002f9ca
commit
ab1d66234a
@ -1,3 +1,9 @@
|
|||||||
|
2006-09-06 Danny Smith <dannysmith@users.sourceforge.net>
|
||||||
|
|
||||||
|
* mingwex/gdtoa/misc.c (pow5mult): Restore original code.
|
||||||
|
* mingwex/gdtoa/gdtoa.h. Add comment that files have been modified.
|
||||||
|
* mingwex/gdtoa/gdtoaimp.h: Include system headers with <> brackets.
|
||||||
|
|
||||||
2006-09-01 Danny Smith <dannysmith@users.sourceforge.net>
|
2006-09-01 Danny Smith <dannysmith@users.sourceforge.net>
|
||||||
|
|
||||||
* mingwex/gdtoa/(arithchk.c, dmisc.c, dtoa.c, g__fmt.c, g_dfmt.c,
|
* mingwex/gdtoa/(arithchk.c, dmisc.c, dtoa.c, g__fmt.c, g_dfmt.c,
|
||||||
|
@ -29,6 +29,9 @@ THIS SOFTWARE.
|
|||||||
/* Please send bug reports to David M. Gay (dmg at acm dot org,
|
/* Please send bug reports to David M. Gay (dmg at acm dot org,
|
||||||
* with " at " changed at "@" and " dot " changed to "."). */
|
* with " at " changed at "@" and " dot " changed to "."). */
|
||||||
|
|
||||||
|
/* Modified by Danny Smith for inclusion in libmingwex.a
|
||||||
|
Aug 2006 */
|
||||||
|
|
||||||
#ifndef GDTOA_H_INCLUDED
|
#ifndef GDTOA_H_INCLUDED
|
||||||
#define GDTOA_H_INCLUDED
|
#define GDTOA_H_INCLUDED
|
||||||
|
|
||||||
@ -108,7 +111,6 @@ extern char* __gdtoa ANSI((FPI *fpi, int be, ULong *bits, int *kindp,
|
|||||||
int mode, int ndigits, int *decpt, char **rve));
|
int mode, int ndigits, int *decpt, char **rve));
|
||||||
extern void __freedtoa ANSI((char*));
|
extern void __freedtoa ANSI((char*));
|
||||||
|
|
||||||
|
|
||||||
extern int __strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*));
|
extern int __strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*));
|
||||||
extern float __strtof ANSI((CONST char *, char **));
|
extern float __strtof ANSI((CONST char *, char **));
|
||||||
extern double __strtod ANSI((CONST char *, char **));
|
extern double __strtod ANSI((CONST char *, char **));
|
||||||
|
@ -174,7 +174,7 @@ THIS SOFTWARE.
|
|||||||
#define MULTIPLE_THREADS 1
|
#define MULTIPLE_THREADS 1
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#include "stdio.h"
|
#include <stdio.h>
|
||||||
#define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);}
|
#define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -235,7 +235,7 @@ extern Char *MALLOC ANSI((size_t));
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else /* ifndef Bad_float_h */
|
#else /* ifndef Bad_float_h */
|
||||||
#include "float.h"
|
#include <float.h>
|
||||||
#endif /* Bad_float_h */
|
#endif /* Bad_float_h */
|
||||||
|
|
||||||
#ifdef IEEE_Arith
|
#ifdef IEEE_Arith
|
||||||
@ -252,7 +252,7 @@ extern Char *MALLOC ANSI((size_t));
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __MATH_H__
|
#ifndef __MATH_H__
|
||||||
#include "math.h"
|
#include <math.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@ -479,7 +479,6 @@ extern void memcpy_D2A ANSI((void*, const void*, size_t));
|
|||||||
#define Bcopy(x,y) memcpy(&x->sign,&y->sign,y->wds*sizeof(ULong) + 2*sizeof(int))
|
#define Bcopy(x,y) memcpy(&x->sign,&y->sign,y->wds*sizeof(ULong) + 2*sizeof(int))
|
||||||
#endif /* NO_STRING_H */
|
#endif /* NO_STRING_H */
|
||||||
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
static inline int
|
static inline int
|
||||||
__lo0bits_D2A (ULong *y)
|
__lo0bits_D2A (ULong *y)
|
||||||
@ -513,7 +512,6 @@ __hi0bits_D2A (ULong y)
|
|||||||
#define decrement __decrement_D2A
|
#define decrement __decrement_D2A
|
||||||
#define diff __diff_D2A
|
#define diff __diff_D2A
|
||||||
#define dtoa_result __dtoa_result_D2A
|
#define dtoa_result __dtoa_result_D2A
|
||||||
#define g__fmt __g__fmt_D2A
|
|
||||||
#define gethex __gethex_D2A
|
#define gethex __gethex_D2A
|
||||||
#define hexdig __hexdig_D2A
|
#define hexdig __hexdig_D2A
|
||||||
#define hexnan __hexnan_D2A
|
#define hexnan __hexnan_D2A
|
||||||
|
@ -36,7 +36,7 @@ THIS SOFTWARE.
|
|||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#define NLOCKS 1
|
#define NLOCKS 2
|
||||||
|
|
||||||
#ifdef USE_WIN32_SL
|
#ifdef USE_WIN32_SL
|
||||||
/* Use spin locks. */
|
/* Use spin locks. */
|
||||||
@ -111,15 +111,12 @@ static void dtoa_unlock(int n)
|
|||||||
|
|
||||||
#endif /* __MINGW32__ */
|
#endif /* __MINGW32__ */
|
||||||
|
|
||||||
|
|
||||||
#include "gdtoaimp.h"
|
#include "gdtoaimp.h"
|
||||||
|
|
||||||
|
|
||||||
#ifndef MULTIPLE_THREADS
|
#ifndef MULTIPLE_THREADS
|
||||||
char *dtoa_result;
|
char *dtoa_result;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static Bigint *freelist[Kmax+1];
|
static Bigint *freelist[Kmax+1];
|
||||||
#ifndef Omit_Private_Memory
|
#ifndef Omit_Private_Memory
|
||||||
#ifndef PRIVATE_MEM
|
#ifndef PRIVATE_MEM
|
||||||
@ -460,25 +457,6 @@ mult
|
|||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 1
|
|
||||||
/* Returns (*b) * (5**k). b is modified. */
|
|
||||||
/* Re-written by Per Bothner to not need a static list. */
|
|
||||||
|
|
||||||
Bigint *
|
|
||||||
pow5mult(Bigint *b, int k)
|
|
||||||
{
|
|
||||||
static int p05[6] = { 5, 25, 125, 625, 3125, 15625 };
|
|
||||||
|
|
||||||
for (; k > 6; k -= 6)
|
|
||||||
multadd(b, 15625, 0); /* b *= 5**6 */
|
|
||||||
if (k != 0)
|
|
||||||
multadd(b, p05[k-1], 0);
|
|
||||||
return b;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#else /* Original code */
|
|
||||||
|
|
||||||
static Bigint *p5s;
|
static Bigint *p5s;
|
||||||
|
|
||||||
Bigint *
|
Bigint *
|
||||||
@ -537,7 +515,6 @@ pow5mult
|
|||||||
}
|
}
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
#endif /* Original code */
|
|
||||||
|
|
||||||
|
|
||||||
Bigint *
|
Bigint *
|
||||||
|
Loading…
x
Reference in New Issue
Block a user