21#ifndef NO_FLOATINGPOINT
23#ifndef __DO_LONG_DOUBLE__
31#if !defined(HAVE_STDLIB_H) || defined(HAVE_DTOA)
32extern char *
ecvt __PR((
double,
int,
int *,
int *));
33extern char *
fcvt __PR((
double,
int,
int *,
int *));
36#if defined(HAVE_ISNAN) && defined(HAVE_ISINF)
45#if defined(HAVE_C99_ISNAN) && defined(HAVE_C99_ISINF)
49#define FOUND_C99_ISNAN
50#define FOUND_C99_ISINF
54#if defined(HAVE_FP_H) && !defined(FOUND_ISXX)
69#if !defined(isnan) && defined(IS_NAN)
73#if !defined(isinf) && defined(FINITE)
77#if defined(FOUND_ISNAN) && defined(FOUND_ISINF)
82#if defined(HAVE_IEEEFP_H) && !defined(FOUND_ISXX) && \
83 !defined(FOUND_C99_ISXX)
100#if defined(FOUND_ISNAN) && defined(FOUND_ISINF)
110#if defined(__hpux) || defined(__QNX__) || defined(__DJGPP__)
111#ifndef FOUND_C99_ISXX
122#if !defined(FOUND_ISNAN) && !defined(HAVE_C99_ISNAN)
124#define isnan(val) (0)
127#if !defined(FOUND_ISINF) && !defined(HAVE_C99_ISINF)
129#define isinf(val) (0)
133#if defined(NO_ISNAN) || defined(NO_ISINF)
143#ifdef WORDS_BIGENDIAN
144#define fpw_high(x) ((UInt32_t *)&x)[0]
145#define fpw_low(x) ((UInt32_t *)&x)[1]
147#define fpw_high(x) ((UInt32_t *)&x)[1]
148#define fpw_low(x) ((UInt32_t *)&x)[0]
150#define FP_EXP 0x7FF00000
151#define fp_exp(x) (fpw_high(x) & FP_EXP)
152#define fp_exc(x) (fp_exp(x) == FP_EXP)
156#define isnan(val) (fp_exc(val) && \
157 (fpw_low(val) != 0 || (fpw_high(val) & 0xFFFFF) != 0))
161#define isinf(val) (fp_exc(val) && \
162 fpw_low(val) == 0 && (fpw_high(val) & 0xFFFFF) == 0)
168#if !defined(HAVE_ECVT) || !defined(HAVE_FCVT) || !defined(HAVE_GCVT)
195#ifdef __DO_LONG_DOUBLE__
197#define MDOUBLE long double
200#define MDOUBLE double
206#define abs(i) ((i) < 0 ? -(i) : (i))
212 register int fieldwidth;
222#ifndef __DO_LONG_DOUBLE__
234#ifdef __DO_LONG_DOUBLE__
236 if (
len <
'0' ||
len >
'9') {
244 if (fieldwidth >
len)
245 while (fieldwidth-- >
len)
253#if defined(HAVE_LOCALECONV) && defined(USE_LOCALE)
261 *rs++ = rdecpt >= 0 ?
'+' :
'-';
262 rdecpt =
abs(rdecpt);
263#ifdef __DO_LONG_DOUBLE__
264 if (rdecpt >= 1000) {
265 *rs++ = rdecpt / 1000 +
'0';
273 *rs++ = rdecpt / 100 +
'0';
276 *rs++ = rdecpt / 10 +
'0';
277 *rs++ = rdecpt % 10 +
'0';
285#if !defined(HAVE_FCVT) && defined(HAVE_ECVT)
293 register int fieldwidth;
303#ifndef __DO_LONG_DOUBLE__
322#ifdef __DO_LONG_DOUBLE__
324 if (
len <
'0' ||
len >
'9') {
335 if (fieldwidth >
len)
336 while (fieldwidth-- >
len)
342 while (*
b &&
len-- > 0)
354#if defined(HAVE_LOCALECONV) && defined(USE_LOCALE)
374#ifndef __DO_LONG_DOUBLE__
376#ifdef HAVE_LONGDOUBLE
378#define qecvt(ld, n, dp, sp) _ldecvt(*(long_double *)&ld, n, dp, sp)
381#define qfcvt(ld, n, dp, sp) _ldfcvt(*(long_double *)&ld, n, dp, sp)
384#if (defined(HAVE_QECVT) || defined(HAVE__LDECVT)) && \
385 (defined(HAVE_QFCVT) || defined(HAVE__LDFCVT))
386#define __DO_LONG_DOUBLE__
392#undef __DO_LONG_DOUBLE__
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
LOCAL int _ferr(char *s, double val)
EXPORT int ftoes(register char *s, MDOUBLE val, register int fieldwidth, register int ndigits)
EXPORT int ftofs(register char *s, MDOUBLE val, register int fieldwidth, register int ndigits)
GLboolean GLboolean GLboolean b
_Check_return_opt_ _CRTIMP struct lconv *__cdecl localeconv(void)
_Check_return_ _CRTIMP char *__cdecl fcvt(_In_ double _Val, _In_ int _NumOfDec, _Out_ int *_PtDec, _Out_ int *_PtSign)
_Check_return_ _CRTIMP char *__cdecl ecvt(_In_ double _Val, _In_ int _NumOfDigits, _Out_ int *_PtDec, _Out_ int *_PtSign)
static size_t double int ndigits
static size_t double int int * decpt