Remove matherr, and SVID and X/Open math library configurations
Default math library configuration is now IEEE
This commit is contained in:
committed by
Corinna Vinschen
parent
1f10a00ba7
commit
b14a879d85
@@ -907,7 +907,6 @@ malloc_stats SIGFE
|
||||
malloc_trim SIGFE
|
||||
malloc_usable_size SIGFE
|
||||
mallopt SIGFE
|
||||
matherr NOSIGFE
|
||||
mblen NOSIGFE
|
||||
mbrlen NOSIGFE
|
||||
mbrtowc NOSIGFE
|
||||
|
@@ -366,7 +366,6 @@ _lseek64 = lseek64 SIGFE
|
||||
_lstat = lstat SIGFE
|
||||
_lstat64 = lstat64 SIGFE
|
||||
_malloc = malloc SIGFE
|
||||
_matherr = matherr NOSIGFE
|
||||
_mblen = mblen NOSIGFE
|
||||
_mbstowcs = mbstowcs NOSIGFE
|
||||
_mbtowc = mbtowc NOSIGFE
|
||||
|
@@ -504,12 +504,13 @@ details. */
|
||||
331: Add timer_getoverrun, DELAYTIMER_MAX.
|
||||
332: Add signalfd.
|
||||
333: Add timerfd_create, timerfd_gettime, timerfd_settime.
|
||||
334: Remove matherr.
|
||||
|
||||
Note that we forgot to bump the api for ualarm, strtoll, strtoull,
|
||||
sigaltstack, sethostname. */
|
||||
|
||||
#define CYGWIN_VERSION_API_MAJOR 0
|
||||
#define CYGWIN_VERSION_API_MINOR 333
|
||||
#define CYGWIN_VERSION_API_MINOR 334
|
||||
|
||||
/* There is also a compatibity version number associated with the shared memory
|
||||
regions. It is incremented when incompatible changes are made to the shared
|
||||
|
@@ -52,12 +52,12 @@ __FLT_ABI(acosh) (__FLT_TYPE x)
|
||||
int x_class = fpclassify (x);
|
||||
if (x_class == FP_NAN || x < __FLT_CST(1.0))
|
||||
{
|
||||
__FLT_RPT_DOMAIN ("acosh", x, 0.0, __FLT_NAN);
|
||||
errno = EDOM;
|
||||
return __FLT_NAN;
|
||||
}
|
||||
else if (x_class == FP_INFINITE)
|
||||
{
|
||||
__FLT_RPT_DOMAIN ("acosh", x, 0.0, __FLT_NAN);
|
||||
errno = EDOM;
|
||||
return __FLT_NAN;
|
||||
}
|
||||
|
||||
|
@@ -120,34 +120,3 @@
|
||||
#else
|
||||
# error "Unknown complex number type"
|
||||
#endif
|
||||
|
||||
#define __FLT_RPT_DOMAIN(NAME, ARG1, ARG2, RSLT) \
|
||||
errno = EDOM, \
|
||||
__mingw_raise_matherr (_DOMAIN, __FLT_REPORT(NAME), (double) (ARG1), \
|
||||
(double) (ARG2), (double) (RSLT))
|
||||
#define __FLT_RPT_ERANGE(NAME, ARG1, ARG2, RSLT, OVL) \
|
||||
errno = ERANGE, \
|
||||
__mingw_raise_matherr (((OVL) ? _OVERFLOW : _UNDERFLOW), \
|
||||
__FLT_REPORT(NAME), (double) (ARG1), \
|
||||
(double) (ARG2), (double) (RSLT))
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
inline void __attribute__ ((always_inline))
|
||||
__mingw_raise_matherr (int typ, const char *name, double a1, double a2,
|
||||
double rslt)
|
||||
{
|
||||
if (_LIB_VERSION != _POSIX_)
|
||||
{
|
||||
struct exception ex;
|
||||
ex.type = typ;
|
||||
ex.name = (char*)name;
|
||||
ex.arg1 = a1;
|
||||
ex.arg2 = a2;
|
||||
ex.retval = rslt;
|
||||
matherr(&ex);
|
||||
}
|
||||
}
|
||||
#define _DOMAIN DOMAIN
|
||||
#define _OVERFLOW OVERFLOW
|
||||
#define _UNDERFLOW UNDERFLOW
|
||||
#endif
|
||||
|
@@ -53,12 +53,12 @@ __FLT_ABI(cos) (__FLT_TYPE x)
|
||||
int x_class = fpclassify (x);
|
||||
if (x_class == FP_NAN)
|
||||
{
|
||||
__FLT_RPT_DOMAIN ("cos", x, 0.0, x);
|
||||
errno = EDOM;
|
||||
return x;
|
||||
}
|
||||
else if (x_class == FP_INFINITE)
|
||||
{
|
||||
__FLT_RPT_DOMAIN ("cos", x, 0.0, __FLT_NAN);
|
||||
errno = EDOM;
|
||||
return __FLT_NAN;
|
||||
}
|
||||
return (__FLT_TYPE) __cosl_internal ((long double) x);
|
||||
|
@@ -109,13 +109,13 @@ __FLT_ABI(exp) (__FLT_TYPE x)
|
||||
int x_class = fpclassify (x);
|
||||
if (x_class == FP_NAN)
|
||||
{
|
||||
__FLT_RPT_DOMAIN ("exp", x, 0.0, x);
|
||||
errno = EDOM;
|
||||
return x;
|
||||
}
|
||||
else if (x_class == FP_INFINITE)
|
||||
{
|
||||
__FLT_TYPE r = (signbit (x) ? __FLT_CST (0.0) : __FLT_HUGE_VAL);
|
||||
__FLT_RPT_ERANGE ("exp", x, 0.0, r, signbit (x));
|
||||
errno = ERANGE;
|
||||
return r;
|
||||
}
|
||||
else if (x_class == FP_ZERO)
|
||||
@@ -124,7 +124,7 @@ __FLT_ABI(exp) (__FLT_TYPE x)
|
||||
}
|
||||
else if (x > __FLT_MAXLOG)
|
||||
{
|
||||
__FLT_RPT_ERANGE ("exp", x, 0.0, __FLT_HUGE_VAL, 1);
|
||||
errno = ERANGE;
|
||||
return __FLT_HUGE_VAL;
|
||||
}
|
||||
else if (x < __FLT_MINLOG)
|
||||
|
@@ -51,7 +51,7 @@ __FLT_ABI(expm1) (__FLT_TYPE x)
|
||||
int x_class = fpclassify (x);
|
||||
if (x_class == FP_NAN)
|
||||
{
|
||||
__FLT_RPT_DOMAIN ("expm1", x, 0.0, x);
|
||||
errno = EDOM;
|
||||
return x;
|
||||
}
|
||||
else if (x_class == FP_INFINITE)
|
||||
|
@@ -53,12 +53,12 @@ __FLT_ABI(log) (__FLT_TYPE x)
|
||||
int x_class = fpclassify (x);
|
||||
if (x_class == FP_ZERO)
|
||||
{
|
||||
__FLT_RPT_ERANGE ("log", x, 0.0, -__FLT_HUGE_VAL, 1);
|
||||
errno = ERANGE;
|
||||
return -__FLT_HUGE_VAL;
|
||||
}
|
||||
else if (signbit (x))
|
||||
{
|
||||
__FLT_RPT_DOMAIN ("log", x, 0.0, __FLT_NAN);
|
||||
errno = EDOM;
|
||||
return __FLT_NAN;
|
||||
}
|
||||
else if (x_class == FP_INFINITE)
|
||||
|
@@ -122,7 +122,7 @@ __FLT_ABI(pow) (__FLT_TYPE x, __FLT_TYPE y)
|
||||
else if (x_class == FP_NAN || y_class == FP_NAN)
|
||||
{
|
||||
rslt = (signbit(x) ? -__FLT_NAN : __FLT_NAN);
|
||||
__FLT_RPT_DOMAIN ("pow", x, y, rslt);
|
||||
errno = EDOM;
|
||||
return rslt;
|
||||
}
|
||||
else if (x_class == FP_ZERO)
|
||||
@@ -133,7 +133,7 @@ __FLT_ABI(pow) (__FLT_TYPE x, __FLT_TYPE y)
|
||||
if (signbit(x) && internal_modf (y, &d) != 0.0)
|
||||
{
|
||||
return signbit (y) ? (1.0 / -x) : __FLT_CST (0.0);
|
||||
/*__FLT_RPT_DOMAIN ("pow", x, y, -__FLT_NAN);
|
||||
/*errno = EDOM;
|
||||
return -__FLT_NAN; */
|
||||
}
|
||||
odd_y = (internal_modf (__FLT_ABI (ldexp) (y, -1), &d) != 0.0) ? 1 : 0;
|
||||
@@ -167,7 +167,7 @@ __FLT_ABI(pow) (__FLT_TYPE x, __FLT_TYPE y)
|
||||
if (signbit(x) && internal_modf (y, &d) != 0.0)
|
||||
{
|
||||
return signbit(y) ? 1.0 / -x : -x;
|
||||
/*__FLT_RPT_DOMAIN ("pow", x, y, -__FLT_NAN);
|
||||
/*errno = EDOM;
|
||||
return -__FLT_NAN;*/
|
||||
}
|
||||
odd_y = (internal_modf (__FLT_ABI (ldexp) (y, -1), &d) != 0.0) ? 1 : 0;
|
||||
@@ -195,7 +195,7 @@ __FLT_ABI(pow) (__FLT_TYPE x, __FLT_TYPE y)
|
||||
{
|
||||
if (signbit (x))
|
||||
{
|
||||
__FLT_RPT_DOMAIN ("pow", x, y, -__FLT_NAN);
|
||||
errno = EDOM;
|
||||
return -__FLT_NAN;
|
||||
}
|
||||
if (y == __FLT_CST(0.5))
|
||||
|
@@ -83,7 +83,7 @@ __FLT_ABI(__powi) (__FLT_TYPE x, int y)
|
||||
else if (x_class == FP_NAN)
|
||||
{
|
||||
rslt = (signbit(x) ? -__FLT_NAN : __FLT_NAN);
|
||||
__FLT_RPT_DOMAIN ("__powi", x, (__FLT_TYPE) y, rslt);
|
||||
errno = EDOM;
|
||||
return rslt;
|
||||
}
|
||||
else if (x_class == FP_ZERO)
|
||||
|
@@ -53,12 +53,12 @@ __FLT_ABI(sin) (__FLT_TYPE x)
|
||||
int x_class = fpclassify (x);
|
||||
if (x_class == FP_NAN)
|
||||
{
|
||||
__FLT_RPT_DOMAIN ("sin", x, 0.0, x);
|
||||
errno = EDOM;
|
||||
return x;
|
||||
}
|
||||
else if (x_class == FP_INFINITE)
|
||||
{
|
||||
__FLT_RPT_DOMAIN ("sin", x, 0.0, __FLT_NAN);
|
||||
errno = EDOM;
|
||||
return __FLT_NAN;
|
||||
}
|
||||
return (__FLT_TYPE) __sinl_internal ((long double) x);
|
||||
|
@@ -73,7 +73,7 @@ __FLT_ABI (sqrt) (__FLT_TYPE x)
|
||||
if (x_class == FP_ZERO)
|
||||
return __FLT_CST (-0.0);
|
||||
|
||||
__FLT_RPT_DOMAIN ("sqrt", x, 0.0, x);
|
||||
errno = EDOM;
|
||||
return x;
|
||||
}
|
||||
else if (x_class == FP_ZERO)
|
||||
|
@@ -53,6 +53,9 @@ What changed:
|
||||
|
||||
- Wctype functions updated to Unicode 11.0.
|
||||
|
||||
- Remove matherr, and SVID and X/Open math library configurations.
|
||||
Default math library configuration is now IEEE.
|
||||
|
||||
|
||||
Bug Fixes
|
||||
---------
|
||||
|
@@ -86,6 +86,11 @@ to free the parent directory.
|
||||
Wctype functions updated to Unicode 11.0.
|
||||
</para></listitem>
|
||||
|
||||
</para></listitem>
|
||||
Remove matherr, and SVID and X/Open math library configurations.
|
||||
Default math library configuration is now IEEE.
|
||||
<listitem><para>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</sect2>
|
||||
|
Reference in New Issue
Block a user