X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com Message-ID: <5A4BEAD2.5070203@gmx.de> Date: Tue, 02 Jan 2018 21:25:54 +0100 From: "Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) [via djgpp AT delorie DOT com]" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.13) Gecko/20101206 SUSE/3.1.7 Thunderbird/3.1.7 MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Fixing argument type of nan[f|l] from libm.a Content-Type: multipart/mixed; boundary="------------090808050105080406070109" X-Provags-ID: V03:K0:bBbIXXi8fdwAp6isnmqCv1iR3EELmIP3z+6hlUNUuZk2jIQdp0X 4zNGTQYTUPsHTlpnIALgnYjAj8lhCwPX5bEcBHUyz85iH3QcK7zjd1dA+JmL279JI74mA7W 6SAXMymxvRtlHuL6ibs5H3Pkga3i3TtxgWbak0B8yXS4eEhBirdnBSNJqTr+rXpqQG6pfrt P+hzcROWru9se74jLCtCg== X-UI-Out-Filterresults: notjunk:1;V01:K0:/xSu1E3o4/k=:IT2099DVV9NbSD70jHH3ac ZHIO4jLl+5BqZ4jSOCdd2Ho0L+UGmnwCzcOokDw/KIyr5ZAfDB/5YamAG23dl0EaTpIUTCVyF A26XbN0dsRHVzpQA/BRhv1Jex9KrVbMOekegCvHlh6sGCyBmb+2ttgsOeaQseqBxB0Id7swgU hBqHOS/fnnS2+pkYjoXENK2u8aFHEZ1M3luBuedWBqkffIqTFvCRhMdGCg+1mbn/U4xa11fHf kWlM/JNFC7I3Feo+ij6t5O7MnnfetbypjWrgyPz5JOXMIoIpU589O8gV7LzTUF/vUHqnmEE5V POpPceNi7/9f6klndKiqU0p0sU+1JK6rmbpOQNS4AQlK+bVjPERAGz/sA4QgLRuhldO3Wc5qI gVUZ78/it9/HLBa0Ia2Htw+3JbebgYLdIGI7e9s9AB1SJTTQDZStPSgdSQ982AGa7SLsLbsF9 jxeiBmwlBNkahpRolbPmFgQbDzNNKFHzo9Mu1DBq7iBUZTrbqQ1EeFB9w3e0dLJdzwce3PjsU xBVLN7gRn9m+U2Lx1DBsKdyK2JkCvN8mcBkyF66eZogOWH+ZHWNCdlYb059Szb/IuGn2Dgl23 cvLBqBTLPEcfUytsHipb2PC7YuQoMY2d5HU9nYAWK4sprg5vgVMNJGr/ZiWXhaMGEVJUwy/Cy mj+yVKmoVV3Jb8ljfxpAmiw6X0zK+e7HvfqXbY71C4UG8PjoavYEWphkidsnm3NK6MIcefORx VRhdRhWavmayCZ+X0v0HCj/w1/NR9cPzRD8dCcxb/+M8aMPzsgh1wbvaNC5vSbbJIHlUmiCKv gvd86FvlGbK5/XUM1dGqu/oN/51WQ== Reply-To: djgpp AT delorie DOT com This is a multi-part message in MIME format. --------------090808050105080406070109 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit The patch below fixes some bugs related to nan[f|l] functions like: - prototypes in math.h are wrong - passing of NaN representation for nan[f|l] of libm.a is missing - due to these errors, the vector codes in tests/cygnus/tgen needs to be fixed. If I do not get any serious objectiond I will commite the files in a couple of days. Regards, Juan M. Guerrero cvs ci -m"Wrong argument type fixed." djgpp/include/libm/math.h cvs ci -m"Wrong argument type fixed." djgpp/src/libm/math/k_standard.c cvs ci -m"Passing a NaN representation implemented." djgpp/src/libm/math/sf_nan.c cvs ci -m"Passing a NaN representation implemented." djgpp/src/libm/math/s_nan.c cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gacoshvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gacosvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gasinhvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gasinvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gatan2vec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gatanhvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gatanvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gcoshvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gcosvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/genmathv.h cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gexpvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gfmodvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gfrexpvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/ggammavec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/ghypotvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gldexpvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/glog10vec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/glog1pvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/glog2vec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/glogvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gmiscvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gmodfvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gpowvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gsinhvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gsinvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gsqrtvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gtanhvec.cpp cvs ci -m"Passing of a NaN representation to nan function." djgpp/tests/cygnus/tgen/gtanvec.cpp diff -aprNU3 djgpp.orig/include/libm/math.h djgpp/include/libm/math.h --- djgpp.orig/include/libm/math.h 2015-07-19 11:28:00 +0000 +++ djgpp/include/libm/math.h 2018-01-02 19:17:00 +0000 @@ -1,3 +1,4 @@ +/* Copyright (C) 2018 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 2015 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 2013 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ @@ -197,7 +198,7 @@ extern double j0 __P((double)); extern double j1 __P((double)); extern double jn __P((int, double)); extern double lgamma __P((double)); -extern double nan __P((void)); +extern double nan __P((const char *)); extern double y0 __P((double)); extern double y1 __P((double)); extern double yn __P((int, double)); @@ -217,7 +218,7 @@ extern double nextafter __P((double, dou extern double pow10 __P((double)); extern double pow2 __P((double)); extern double powi __P((double, int)); -extern void sincos __P((double *, double *, double)); +extern void sincos __P((double, double *, double *)); extern double remainder __P((double, double)); extern double scalb __P((double, double)); @@ -296,7 +297,7 @@ extern float j0f __P((float)); extern float j1f __P((float)); extern float jnf __P((int, float)); extern float lgammaf __P((float)); -extern float nanf __P((void)); +extern float nanf __P((const char *)); extern float y0f __P((float)); extern float y1f __P((float)); extern float ynf __P((int, float)); diff -aprNU3 djgpp.orig/src/libm/math/k_standard.c djgpp/src/libm/math/k_standard.c --- djgpp.orig/src/libm/math/k_standard.c 1998-10-04 10:48:42 +0000 +++ djgpp/src/libm/math/k_standard.c 2018-01-02 19:20:08 +0000 @@ -30,6 +30,8 @@ static const double zero = 0.0; /* used static double zero = 0.0; /* used as const */ #endif +#define DBL_NAN "0x7FF8000000000000" + /* * Standard conformance (non-IEEE) on exception cases. * Mapping: @@ -105,7 +107,7 @@ static double zero = 0.0; /* used as con /* acos(|x|>1) */ exc.type = DOMAIN; exc.name = type < 100 ? "acos" : "acosf"; - exc.retval = nan(); + exc.retval = nan(DBL_NAN); if (_LIB_VERSION == _POSIX_) errno = EDOM; else if (!matherr(&exc)) { @@ -120,7 +122,7 @@ static double zero = 0.0; /* used as con /* asin(|x|>1) */ exc.type = DOMAIN; exc.name = type < 100 ? "asin" : "asinf"; - exc.retval = nan(); + exc.retval = nan(DBL_NAN); if(_LIB_VERSION == _POSIX_) errno = EDOM; else if (!matherr(&exc)) { @@ -539,7 +541,7 @@ static double zero = 0.0; /* used as con if (_LIB_VERSION == _SVID_) exc.retval = x; else - exc.retval = nan(); + exc.retval = nan(DBL_NAN); if (_LIB_VERSION == _POSIX_) errno = EDOM; else if (!matherr(&exc)) { @@ -554,7 +556,7 @@ static double zero = 0.0; /* used as con /* remainder(x,0) */ exc.type = DOMAIN; exc.name = type < 100 ? "remainder" : "remainderf"; - exc.retval = nan(); + exc.retval = nan(DBL_NAN); if (_LIB_VERSION == _POSIX_) errno = EDOM; else if (!matherr(&exc)) { @@ -569,7 +571,7 @@ static double zero = 0.0; /* used as con /* acosh(x<1) */ exc.type = DOMAIN; exc.name = type < 100 ? "acosh" : "acoshf"; - exc.retval = nan(); + exc.retval = nan(DBL_NAN); if (_LIB_VERSION == _POSIX_) errno = EDOM; else if (!matherr(&exc)) { @@ -584,7 +586,7 @@ static double zero = 0.0; /* used as con /* atanh(|x|>1) */ exc.type = DOMAIN; exc.name = type < 100 ? "atanh" : "atanhf"; - exc.retval = nan(); + exc.retval = nan(DBL_NAN); if (_LIB_VERSION == _POSIX_) errno = EDOM; else if (!matherr(&exc)) { diff -aprNU3 djgpp.orig/src/libm/math/sf_nan.c djgpp/src/libm/math/sf_nan.c --- djgpp.orig/src/libm/math/sf_nan.c 1999-12-14 12:01:34 +0000 +++ djgpp/src/libm/math/sf_nan.c 2018-01-02 19:17:00 +0000 @@ -1,3 +1,4 @@ +/* Copyright (C) 2018 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ /* @@ -17,16 +18,16 @@ to not mess this up. */ static const ieee_float_shape_type a_nan = { 0x7fc00000 }; - float nanf() + float nanf(const char *tagp) { return a_nan.value; } #ifdef _DOUBLE_IS_32BITS - double nan() + double nan(const char *tagp) { - return (double) nanf(); + return (double) nanf(tagp); } #endif /* defined(_DOUBLE_IS_32BITS) */ diff -aprNU3 djgpp.orig/src/libm/math/s_nan.c djgpp/src/libm/math/s_nan.c --- djgpp.orig/src/libm/math/s_nan.c 1999-12-14 12:01:34 +0000 +++ djgpp/src/libm/math/s_nan.c 2018-01-02 19:17:00 +0000 @@ -1,3 +1,4 @@ +/* Copyright (C) 2018 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ /* @@ -16,18 +17,21 @@ INDEX ANSI_SYNOPSIS #include - double nan(void); - float nanf(void); + double nan(const char *tagp); + float nanf(const char *tagp); TRAD_SYNOPSIS #include - double nan(); - float nanf(); + double nan(tagp); + const char *tagp; + float nanf(tagp); + const char *tagp; DESCRIPTION <> and <> return an IEEE NaN (Not a Number) in - double and single precision arithmetic respectivly. + double- and single-precision arithmetic respectively. The + argument is currently disregarded. QUICKREF nan - pure @@ -49,9 +53,10 @@ QUICKREF static const ieee_double_shape_type a_nan = { {0, 0x7ff80000} }; #ifdef __STDC__ - double nan(void) + double nan(const char *tagp) #else - double nan() + double nan(tagp) + const char *tagp; #endif { return a_nan.value; diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gacoshvec.cpp djgpp/tests/cygnus/tgen/gacoshvec.cpp --- djgpp.orig/tests/cygnus/tgen/gacoshvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gacoshvec.cpp 2018-01-02 19:39:24 +0000 @@ -63,25 +63,25 @@ GenDblVector(char *Name) // -------------- Argument = -1.125; - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); Argument = 0; - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = -infinity(); - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); @@ -134,22 +134,22 @@ GenFltVector(char *Name) // -------------- Argument = -1.125; - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); Argument = 0; - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = -infinityf(); - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gacosvec.cpp djgpp/tests/cygnus/tgen/gacosvec.cpp --- djgpp.orig/tests/cygnus/tgen/gacosvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gacosvec.cpp 2018-01-02 19:51:42 +0000 @@ -69,22 +69,22 @@ GenDblVector(char *Name) // -------------- Argument = -1.25; - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); Argument = +1.25; - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = infinity(); - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); @@ -137,22 +137,22 @@ GenFltVector(char *Name) // -------------- Argument = -1.25; - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); Argument = +1.25; - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = infinityf(); - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gasinhvec.cpp djgpp/tests/cygnus/tgen/gasinhvec.cpp --- djgpp.orig/tests/cygnus/tgen/gasinhvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gasinhvec.cpp 2018-01-02 19:39:24 +0000 @@ -87,8 +87,8 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -156,8 +156,8 @@ GenFltVector(char *Name) _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gasinvec.cpp djgpp/tests/cygnus/tgen/gasinvec.cpp --- djgpp.orig/tests/cygnus/tgen/gasinvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gasinvec.cpp 2018-01-02 19:39:24 +0000 @@ -69,22 +69,22 @@ GenDblVector(char *Name) // -------------- Argument = -1.1; - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); Argument = +1.1; - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = infinity(); - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); @@ -137,22 +137,22 @@ GenFltVector(char *Name) // -------------- Argument = -1.1; - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); Argument = +1.1; - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = infinity(); - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gatan2vec.cpp djgpp/tests/cygnus/tgen/gatan2vec.cpp --- djgpp.orig/tests/cygnus/tgen/gatan2vec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gatan2vec.cpp 2018-01-02 19:39:24 +0000 @@ -161,14 +161,14 @@ GenDblVector(char *Name) Write2Vector(DBL_MEAS_BIT, ArgY, ArgX, Expected, __NO_ERROR_); ArgY = 1.0; - ArgX = nan(); - Expected = nan(); + ArgX = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); Write2Vector(DBL_MEAS_BIT, ArgY, ArgX, Expected, __NO_ERROR_); - ArgY = nan(); + ArgY = nan(DBL_NAN); ArgX = infinity(); - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); Write2Vector(DBL_MEAS_BIT, ArgY, ArgX, Expected, __NO_ERROR_); @@ -329,14 +329,14 @@ GenFltVector(char *Name) Write2Vector(FLT_MEAS_BIT, ArgY, ArgX, Expected, __NO_ERROR_); ArgY = 1.0; - ArgX = nan(); - Expected = nan(); + ArgX = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); Write2Vector(FLT_MEAS_BIT, ArgY, ArgX, Expected, __NO_ERROR_); - ArgY = nan(); + ArgY = nan(FLT_NAN); ArgX = infinityf(); - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); Write2Vector(FLT_MEAS_BIT, ArgY, ArgX, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gatanhvec.cpp djgpp/tests/cygnus/tgen/gatanhvec.cpp --- djgpp.orig/tests/cygnus/tgen/gatanhvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gatanhvec.cpp 2018-01-02 19:39:24 +0000 @@ -61,7 +61,7 @@ GenDblVector(char *Name) // -------------- Argument = -1.25; - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); @@ -73,7 +73,7 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); Argument = 1.25; - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); @@ -85,25 +85,25 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); Argument = -infinity(); - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); Argument = infinity(); - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -150,7 +150,7 @@ GenFltVector(char *Name) // -------------- Argument = -1.25; - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); @@ -162,7 +162,7 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); Argument = 1.25; - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); @@ -174,25 +174,25 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); Argument = -infinityf(); - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); Argument = infinityf(); - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gatanvec.cpp djgpp/tests/cygnus/tgen/gatanvec.cpp --- djgpp.orig/tests/cygnus/tgen/gatanvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gatanvec.cpp 2018-01-02 19:39:24 +0000 @@ -80,13 +80,13 @@ GenDblVector(char *Name) _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -161,13 +161,13 @@ GenFltVector(char *Name) _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gcoshvec.cpp djgpp/tests/cygnus/tgen/gcoshvec.cpp --- djgpp.orig/tests/cygnus/tgen/gcoshvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gcoshvec.cpp 2018-01-02 19:39:24 +0000 @@ -91,15 +91,15 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, ERANGE); _fpreset(); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); _fpreset(); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -181,15 +181,15 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, ERANGE); _fpreset(); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); _fpreset(); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gcosvec.cpp djgpp/tests/cygnus/tgen/gcosvec.cpp --- djgpp.orig/tests/cygnus/tgen/gcosvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gcosvec.cpp 2018-01-02 19:53:24 +0000 @@ -68,25 +68,25 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = -infinity(); - Expected = -nan(); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = +infinity(); - Expected = -nan(); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -146,25 +146,25 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = -infinityf(); - Expected = -nan(); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = +infinityf(); - Expected = -nan(); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/genmathv.h djgpp/tests/cygnus/tgen/genmathv.h --- djgpp.orig/tests/cygnus/tgen/genmathv.h 2003-11-14 10:33:14 +0000 +++ djgpp/tests/cygnus/tgen/genmathv.h 2018-01-02 19:46:02 +0000 @@ -6,6 +6,9 @@ # else # define _GEN_MATHV_H_ +#define DBL_NAN "0x7FF8000000000000" +#define FLT_NAN "0x7FC00000" + #define __NO_ERROR_ 0 #define EQUAL(s1, s2) (strcmp(s1, s2) == 0) diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gexpvec.cpp djgpp/tests/cygnus/tgen/gexpvec.cpp --- djgpp.orig/tests/cygnus/tgen/gexpvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gexpvec.cpp 2018-01-02 19:39:24 +0000 @@ -103,14 +103,14 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -200,14 +200,14 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gfmodvec.cpp djgpp/tests/cygnus/tgen/gfmodvec.cpp --- djgpp.orig/tests/cygnus/tgen/gfmodvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gfmodvec.cpp 2018-01-02 20:22:06 +0000 @@ -94,7 +94,7 @@ GenDblVector(char *Name) Write2Vector(DBL_MEAS_BIT, ArgX, ArgY, Expected, Err); \ _fpreset(); \ } - NextAns = nan(); + NextAns = nan(DBL_NAN); _fpreset(); NEXT_DBL_VECTOR(0, 0, NextAns, EDOM) @@ -104,7 +104,7 @@ GenDblVector(char *Name) NextAns = 0.0; NEXT_DBL_VECTOR(DBL_MAX, DBL_MAX, NextAns, __NO_ERROR_) - NextAns = nan(); + NextAns = nan(DBL_NAN); _fpreset(); NEXT_DBL_VECTOR(DBL_MAX, 0, NextAns, EDOM) @@ -114,21 +114,21 @@ GenDblVector(char *Name) NextAns = DBL_MIN; NEXT_DBL_VECTOR(DBL_MIN, DBL_MAX, NextAns, __NO_ERROR_) - NextAns = -nan(); + NextAns = -nan(DBL_NAN); _fpreset(); NEXT_DBL_VECTOR(infinity(), infinity(), NextAns, __NO_ERROR_) - NextAns = -nan(); + NextAns = -nan(DBL_NAN); _fpreset(); NEXT_DBL_VECTOR(-infinity(), -infinity(), NextAns, __NO_ERROR_) - NextAns = nan(); + NextAns = nan(DBL_NAN); _fpreset(); - NEXT_DBL_VECTOR(nan(), nan(), NextAns, __NO_ERROR_) + NEXT_DBL_VECTOR(nan(DBL_NAN), nan(DBL_NAN), NextAns, __NO_ERROR_) - NextAns = nan(); + NextAns = nan(DBL_NAN); _fpreset(); - NEXT_DBL_VECTOR(infinity(), nan(), NextAns, __NO_ERROR_) + NEXT_DBL_VECTOR(infinity(), nan(DBL_NAN), NextAns, __NO_ERROR_) // Generate last lines (code lines) of file @@ -198,7 +198,7 @@ GenFltVector(char *Name) Write2Vector(FLT_MEAS_BIT, ArgX, ArgY, Expected, Err); \ _fpreset(); \ } - NextAns = nan(); + NextAns = nan(FLT_NAN); _fpreset(); NEXT_FLT_VECTOR(0, 0, NextAns, EDOM) @@ -208,7 +208,7 @@ GenFltVector(char *Name) NextAns = 0.0; NEXT_FLT_VECTOR(FLT_MAX, FLT_MAX, NextAns, __NO_ERROR_) - NextAns = nan(); + NextAns = nan(FLT_NAN); _fpreset(); NEXT_FLT_VECTOR(FLT_MAX, 0, NextAns, EDOM) @@ -218,21 +218,21 @@ GenFltVector(char *Name) NextAns = FLT_MIN; NEXT_FLT_VECTOR(FLT_MIN, FLT_MAX, NextAns, __NO_ERROR_) - NextAns = -nan(); + NextAns = -nan(FLT_NAN); _fpreset(); NEXT_FLT_VECTOR(infinityf(), infinityf(), NextAns, __NO_ERROR_) - NextAns = -nan(); + NextAns = -nan(FLT_NAN); _fpreset(); NEXT_FLT_VECTOR(-infinityf(), -infinityf(), NextAns, __NO_ERROR_) - NextAns = nan(); + NextAns = nan(FLT_NAN); _fpreset(); - NEXT_FLT_VECTOR(nan(), nan(), NextAns, __NO_ERROR_) + NEXT_FLT_VECTOR(nan(FLT_NAN), nan(FLT_NAN), NextAns, __NO_ERROR_) - NextAns = nan(); + NextAns = nan(FLT_NAN); _fpreset(); - NEXT_FLT_VECTOR(infinity(), nan(), NextAns, __NO_ERROR_) + NEXT_FLT_VECTOR(infinity(), nan(FLT_NAN), NextAns, __NO_ERROR_) // Generate last lines (code lines) of file diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gfrexpvec.cpp djgpp/tests/cygnus/tgen/gfrexpvec.cpp --- djgpp.orig/tests/cygnus/tgen/gfrexpvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gfrexpvec.cpp 2018-01-02 20:23:44 +0000 @@ -89,7 +89,7 @@ GenDblVector(char *Name) NextFrac = xtod(xfrexp(DBL_MAX, NextInt)); NEXT_DBL_VECTOR(DBL_MAX, NextInt, NextFrac, __NO_ERROR_); - NEXT_DBL_VECTOR(nan(), 0.0, nan(), __NO_ERROR_); + NEXT_DBL_VECTOR(nan(DBL_NAN), 0.0, nan(DBL_NAN), __NO_ERROR_); NEXT_DBL_VECTOR(infinity(), 0.0, infinity(), __NO_ERROR_); // Generate last lines (code lines) of file @@ -162,7 +162,7 @@ GenFltVector(char *Name) NextFrac = xtod(xfrexp(FLT_MAX, NextInt)); NEXT_FLT_VECTOR(FLT_MAX, NextInt, NextFrac, __NO_ERROR_); - NEXT_FLT_VECTOR(nan(), 0.0, nan(), __NO_ERROR_); + NEXT_FLT_VECTOR(nan(FLT_NAN), 0.0, nan(FLT_NAN), __NO_ERROR_); NEXT_FLT_VECTOR(infinity(), 0.0, infinity(), __NO_ERROR_); // Generate last lines (code lines) of file diff -aprNU3 djgpp.orig/tests/cygnus/tgen/ggammavec.cpp djgpp/tests/cygnus/tgen/ggammavec.cpp --- djgpp.orig/tests/cygnus/tgen/ggammavec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/ggammavec.cpp 2018-01-02 19:39:24 +0000 @@ -93,8 +93,8 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -171,8 +171,8 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/ghypotvec.cpp djgpp/tests/cygnus/tgen/ghypotvec.cpp --- djgpp.orig/tests/cygnus/tgen/ghypotvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/ghypotvec.cpp 2018-01-02 20:25:46 +0000 @@ -108,11 +108,11 @@ GenDblVector(char *Name) NextAns = infinity(); NEXT_DBL_VECTOR(infinity(), infinity(), NextAns, ERANGE) - NextAns = nan(); - NEXT_DBL_VECTOR(nan(), nan(), NextAns, __NO_ERROR_) + NextAns = nan(DBL_NAN); + NEXT_DBL_VECTOR(nan(DBL_NAN), nan(DBL_NAN), NextAns, __NO_ERROR_) - NextAns = nan(); - NEXT_DBL_VECTOR(infinity(), nan(), NextAns, __NO_ERROR_) + NextAns = nan(DBL_NAN); + NEXT_DBL_VECTOR(infinity(), nan(DBL_NAN), NextAns, __NO_ERROR_) // Generate last lines (code lines) of file @@ -197,11 +197,11 @@ GenFltVector(char *Name) NextAns = infinityf(); NEXT_FLT_VECTOR(infinityf(), infinityf(), NextAns, ERANGE) - NextAns = nan(); - NEXT_FLT_VECTOR(nan(), nan(), NextAns, __NO_ERROR_) + NextAns = nan(FLT_NAN); + NEXT_FLT_VECTOR(nan(FLT_NAN), nan(FLT_NAN), NextAns, __NO_ERROR_) - NextAns = nan(); - NEXT_FLT_VECTOR(infinity(), nan(), NextAns, __NO_ERROR_) + NextAns = nan(FLT_NAN); + NEXT_FLT_VECTOR(infinity(), nan(FLT_NAN), NextAns, __NO_ERROR_) // Generate last lines (code lines) of file diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gldexpvec.cpp djgpp/tests/cygnus/tgen/gldexpvec.cpp --- djgpp.orig/tests/cygnus/tgen/gldexpvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gldexpvec.cpp 2018-01-02 19:39:24 +0000 @@ -139,15 +139,15 @@ GenDblVector(char *Name) _fpreset(); Write2Vector(DBL_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); - ArgX = nan(); + ArgX = nan(DBL_NAN); ArgY = 2047; - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); Write2Vector(DBL_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); - ArgX = -nan(); + ArgX = -nan(DBL_NAN); ArgY = -2047; - Expected = -nan(); + Expected = -nan(DBL_NAN); _fpreset(); Write2Vector(DBL_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); @@ -265,15 +265,15 @@ GenFltVector(char *Name) _fpreset(); Write2Vector(FLT_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); - ArgX = nan(); + ArgX = nan(FLT_NAN); ArgY = 2047; - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); Write2Vector(FLT_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); - ArgX = -nan(); + ArgX = -nan(FLT_NAN); ArgY = -2047; - Expected = -nan(); + Expected = -nan(FLT_NAN); _fpreset(); Write2Vector(DBL_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/glog10vec.cpp djgpp/tests/cygnus/tgen/glog10vec.cpp --- djgpp.orig/tests/cygnus/tgen/glog10vec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/glog10vec.cpp 2018-01-02 19:39:24 +0000 @@ -101,14 +101,14 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -200,14 +200,14 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/glog1pvec.cpp djgpp/tests/cygnus/tgen/glog1pvec.cpp --- djgpp.orig/tests/cygnus/tgen/glog1pvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/glog1pvec.cpp 2018-01-02 19:39:24 +0000 @@ -101,14 +101,14 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -200,14 +200,14 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/glog2vec.cpp djgpp/tests/cygnus/tgen/glog2vec.cpp --- djgpp.orig/tests/cygnus/tgen/glog2vec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/glog2vec.cpp 2018-01-02 19:39:24 +0000 @@ -108,14 +108,14 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -213,14 +213,14 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/glogvec.cpp djgpp/tests/cygnus/tgen/glogvec.cpp --- djgpp.orig/tests/cygnus/tgen/glogvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/glogvec.cpp 2018-01-02 19:39:24 +0000 @@ -101,14 +101,14 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -200,14 +200,14 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gmiscvec.cpp djgpp/tests/cygnus/tgen/gmiscvec.cpp --- djgpp.orig/tests/cygnus/tgen/gmiscvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gmiscvec.cpp 2018-01-02 19:39:24 +0000 @@ -161,7 +161,7 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, errno); _fpreset(); - Argument = nan(); + Argument = nan(DBL_NAN); if (EQUAL(Name, StrCeil)) { Expected = Argument; @@ -180,7 +180,7 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, errno); _fpreset(); - Argument = -nan(); + Argument = -nan(DBL_NAN); if (EQUAL(Name, StrCeil)) { Expected = Argument; @@ -321,7 +321,7 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, errno); _fpreset(); - Argument = nan(); + Argument = nan(FLT_NAN); if (EQUAL(Name, StrCeilf)) { Expected = Argument; @@ -340,7 +340,7 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, errno); _fpreset(); - Argument = -nan(); + Argument = -nan(FLT_NAN); if (EQUAL(Name, StrCeilf)) { Expected = Argument; diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gmodfvec.cpp djgpp/tests/cygnus/tgen/gmodfvec.cpp --- djgpp.orig/tests/cygnus/tgen/gmodfvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gmodfvec.cpp 2018-01-02 20:28:28 +0000 @@ -101,7 +101,7 @@ GenDblVector(char *Name) NEXT_DBL_VECTOR(DBL_MIN, 0.0, DBL_MIN, __NO_ERROR_); NEXT_DBL_VECTOR(DBL_MAX, DBL_MAX, 0.0, __NO_ERROR_); - NEXT_DBL_VECTOR(nan(), nan(), 0.0, __NO_ERROR_); + NEXT_DBL_VECTOR(nan(DBL_NAN), nan(DBL_NAN), 0.0, __NO_ERROR_); NEXT_DBL_VECTOR(infinity(), infinity(), 0.0, __NO_ERROR_); // Generate last lines (code lines) of file @@ -186,7 +186,7 @@ GenFltVector(char *Name) NEXT_FLT_VECTOR(FLT_MIN, 0.0, FLT_MIN, __NO_ERROR_); NEXT_FLT_VECTOR(FLT_MAX, FLT_MAX, 0.0, __NO_ERROR_); - NEXT_FLT_VECTOR(nan(), nan(), 0.0, __NO_ERROR_); + NEXT_FLT_VECTOR(nan(FLT_NAN), nan(FLT_NAN), 0.0, __NO_ERROR_); NEXT_FLT_VECTOR(infinityf(), infinityf(), 0.0, __NO_ERROR_); // Generate last lines (code lines) of file diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gpowvec.cpp djgpp/tests/cygnus/tgen/gpowvec.cpp --- djgpp.orig/tests/cygnus/tgen/gpowvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gpowvec.cpp 2018-01-02 19:39:24 +0000 @@ -115,7 +115,7 @@ GenDblVector(char *Name) ArgX = -1.0; ArgY = infinity(); - Expected = -nan(); + Expected = -nan(DBL_NAN); _fpreset(); Write2Vector(DBL_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); @@ -127,7 +127,7 @@ GenDblVector(char *Name) ArgX = -1.0; ArgY = -infinity(); - Expected = -nan(); + Expected = -nan(DBL_NAN); _fpreset(); Write2Vector(DBL_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); @@ -180,14 +180,14 @@ GenDblVector(char *Name) Write2Vector(DBL_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); ArgX = 1.0; - ArgY = nan(); - Expected = nan(); + ArgY = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); Write2Vector(DBL_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); - ArgX = nan(); + ArgX = nan(DBL_NAN); ArgY = infinity(); - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); Write2Vector(DBL_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); @@ -286,7 +286,7 @@ GenFltVector(char *Name) ArgX = -1.0; ArgY = infinityf(); - Expected = -nan(); + Expected = -nan(FLT_NAN); _fpreset(); Write2Vector(FLT_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); @@ -298,7 +298,7 @@ GenFltVector(char *Name) ArgX = -1.0; ArgY = -infinityf(); - Expected = -nan(); + Expected = -nan(FLT_NAN); _fpreset(); Write2Vector(FLT_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); @@ -351,14 +351,14 @@ GenFltVector(char *Name) Write2Vector(FLT_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); ArgX = 1.0; - ArgY = nan(); - Expected = nan(); + ArgY = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); Write2Vector(FLT_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); - ArgX = nan(); + ArgX = nan(FLT_NAN); ArgY = infinityf(); - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); Write2Vector(FLT_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gsinhvec.cpp djgpp/tests/cygnus/tgen/gsinhvec.cpp --- djgpp.orig/tests/cygnus/tgen/gsinhvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gsinhvec.cpp 2018-01-02 19:39:24 +0000 @@ -88,14 +88,14 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -172,14 +172,14 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gsinvec.cpp djgpp/tests/cygnus/tgen/gsinvec.cpp --- djgpp.orig/tests/cygnus/tgen/gsinvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gsinvec.cpp 2018-01-02 19:39:24 +0000 @@ -68,23 +68,23 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = -infinity(); - Expected = -nan(); + Expected = -nan(DBL_NAN); _fpreset(); Argument = +infinity(); - Expected = -nan(); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -144,25 +144,25 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = -infinityf(); - Expected = -nan(); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = +infinityf(); - Expected = -nan(); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gsqrtvec.cpp djgpp/tests/cygnus/tgen/gsqrtvec.cpp --- djgpp.orig/tests/cygnus/tgen/gsqrtvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gsqrtvec.cpp 2018-01-02 19:39:24 +0000 @@ -66,7 +66,7 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = -1.0; - Expected = -nan(); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); @@ -77,14 +77,14 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -137,7 +137,7 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = -1.0; - Expected = -nan(); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); @@ -148,14 +148,14 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gtanhvec.cpp djgpp/tests/cygnus/tgen/gtanhvec.cpp --- djgpp.orig/tests/cygnus/tgen/gtanhvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gtanhvec.cpp 2018-01-02 19:39:24 +0000 @@ -75,14 +75,14 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -140,14 +140,14 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gtanvec.cpp djgpp/tests/cygnus/tgen/gtanvec.cpp --- djgpp.orig/tests/cygnus/tgen/gtanvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gtanvec.cpp 2018-01-02 19:39:24 +0000 @@ -70,25 +70,25 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = -infinity(); - Expected = -nan(); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = +infinity(); - Expected = -nan(); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -147,25 +147,25 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = -infinityf(); - Expected = -nan(); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = +infinityf(); - Expected = -nan(); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); --------------090808050105080406070109 Content-Type: text/x-patch; name="nan.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="nan.patch" diff -aprNU3 djgpp.orig/include/libm/math.h djgpp/include/libm/math.h --- djgpp.orig/include/libm/math.h 2015-07-19 11:28:00 +0000 +++ djgpp/include/libm/math.h 2018-01-02 19:17:00 +0000 @@ -1,3 +1,4 @@ +/* Copyright (C) 2018 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 2015 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 2013 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ @@ -197,7 +198,7 @@ extern double j0 __P((double)); extern double j1 __P((double)); extern double jn __P((int, double)); extern double lgamma __P((double)); -extern double nan __P((void)); +extern double nan __P((const char *)); extern double y0 __P((double)); extern double y1 __P((double)); extern double yn __P((int, double)); @@ -217,7 +218,7 @@ extern double nextafter __P((double, dou extern double pow10 __P((double)); extern double pow2 __P((double)); extern double powi __P((double, int)); -extern void sincos __P((double *, double *, double)); +extern void sincos __P((double, double *, double *)); extern double remainder __P((double, double)); extern double scalb __P((double, double)); @@ -296,7 +297,7 @@ extern float j0f __P((float)); extern float j1f __P((float)); extern float jnf __P((int, float)); extern float lgammaf __P((float)); -extern float nanf __P((void)); +extern float nanf __P((const char *)); extern float y0f __P((float)); extern float y1f __P((float)); extern float ynf __P((int, float)); diff -aprNU3 djgpp.orig/src/libm/math/k_standard.c djgpp/src/libm/math/k_standard.c --- djgpp.orig/src/libm/math/k_standard.c 1998-10-04 10:48:42 +0000 +++ djgpp/src/libm/math/k_standard.c 2018-01-02 19:20:08 +0000 @@ -30,6 +30,8 @@ static const double zero = 0.0; /* used static double zero = 0.0; /* used as const */ #endif +#define DBL_NAN "0x7FF8000000000000" + /* * Standard conformance (non-IEEE) on exception cases. * Mapping: @@ -105,7 +107,7 @@ static double zero = 0.0; /* used as con /* acos(|x|>1) */ exc.type = DOMAIN; exc.name = type < 100 ? "acos" : "acosf"; - exc.retval = nan(); + exc.retval = nan(DBL_NAN); if (_LIB_VERSION == _POSIX_) errno = EDOM; else if (!matherr(&exc)) { @@ -120,7 +122,7 @@ static double zero = 0.0; /* used as con /* asin(|x|>1) */ exc.type = DOMAIN; exc.name = type < 100 ? "asin" : "asinf"; - exc.retval = nan(); + exc.retval = nan(DBL_NAN); if(_LIB_VERSION == _POSIX_) errno = EDOM; else if (!matherr(&exc)) { @@ -539,7 +541,7 @@ static double zero = 0.0; /* used as con if (_LIB_VERSION == _SVID_) exc.retval = x; else - exc.retval = nan(); + exc.retval = nan(DBL_NAN); if (_LIB_VERSION == _POSIX_) errno = EDOM; else if (!matherr(&exc)) { @@ -554,7 +556,7 @@ static double zero = 0.0; /* used as con /* remainder(x,0) */ exc.type = DOMAIN; exc.name = type < 100 ? "remainder" : "remainderf"; - exc.retval = nan(); + exc.retval = nan(DBL_NAN); if (_LIB_VERSION == _POSIX_) errno = EDOM; else if (!matherr(&exc)) { @@ -569,7 +571,7 @@ static double zero = 0.0; /* used as con /* acosh(x<1) */ exc.type = DOMAIN; exc.name = type < 100 ? "acosh" : "acoshf"; - exc.retval = nan(); + exc.retval = nan(DBL_NAN); if (_LIB_VERSION == _POSIX_) errno = EDOM; else if (!matherr(&exc)) { @@ -584,7 +586,7 @@ static double zero = 0.0; /* used as con /* atanh(|x|>1) */ exc.type = DOMAIN; exc.name = type < 100 ? "atanh" : "atanhf"; - exc.retval = nan(); + exc.retval = nan(DBL_NAN); if (_LIB_VERSION == _POSIX_) errno = EDOM; else if (!matherr(&exc)) { diff -aprNU3 djgpp.orig/src/libm/math/sf_nan.c djgpp/src/libm/math/sf_nan.c --- djgpp.orig/src/libm/math/sf_nan.c 1999-12-14 12:01:34 +0000 +++ djgpp/src/libm/math/sf_nan.c 2018-01-02 19:17:00 +0000 @@ -1,3 +1,4 @@ +/* Copyright (C) 2018 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ /* @@ -17,16 +18,16 @@ to not mess this up. */ static const ieee_float_shape_type a_nan = { 0x7fc00000 }; - float nanf() + float nanf(const char *tagp) { return a_nan.value; } #ifdef _DOUBLE_IS_32BITS - double nan() + double nan(const char *tagp) { - return (double) nanf(); + return (double) nanf(tagp); } #endif /* defined(_DOUBLE_IS_32BITS) */ diff -aprNU3 djgpp.orig/src/libm/math/s_nan.c djgpp/src/libm/math/s_nan.c --- djgpp.orig/src/libm/math/s_nan.c 1999-12-14 12:01:34 +0000 +++ djgpp/src/libm/math/s_nan.c 2018-01-02 19:17:00 +0000 @@ -1,3 +1,4 @@ +/* Copyright (C) 2018 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ /* @@ -16,18 +17,21 @@ INDEX ANSI_SYNOPSIS #include - double nan(void); - float nanf(void); + double nan(const char *tagp); + float nanf(const char *tagp); TRAD_SYNOPSIS #include - double nan(); - float nanf(); + double nan(tagp); + const char *tagp; + float nanf(tagp); + const char *tagp; DESCRIPTION <> and <> return an IEEE NaN (Not a Number) in - double and single precision arithmetic respectivly. + double- and single-precision arithmetic respectively. The + argument is currently disregarded. QUICKREF nan - pure @@ -49,9 +53,10 @@ QUICKREF static const ieee_double_shape_type a_nan = { {0, 0x7ff80000} }; #ifdef __STDC__ - double nan(void) + double nan(const char *tagp) #else - double nan() + double nan(tagp) + const char *tagp; #endif { return a_nan.value; diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gacoshvec.cpp djgpp/tests/cygnus/tgen/gacoshvec.cpp --- djgpp.orig/tests/cygnus/tgen/gacoshvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gacoshvec.cpp 2018-01-02 19:39:24 +0000 @@ -63,25 +63,25 @@ GenDblVector(char *Name) // -------------- Argument = -1.125; - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); Argument = 0; - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = -infinity(); - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); @@ -134,22 +134,22 @@ GenFltVector(char *Name) // -------------- Argument = -1.125; - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); Argument = 0; - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = -infinityf(); - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gacosvec.cpp djgpp/tests/cygnus/tgen/gacosvec.cpp --- djgpp.orig/tests/cygnus/tgen/gacosvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gacosvec.cpp 2018-01-02 19:51:42 +0000 @@ -69,22 +69,22 @@ GenDblVector(char *Name) // -------------- Argument = -1.25; - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); Argument = +1.25; - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = infinity(); - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); @@ -137,22 +137,22 @@ GenFltVector(char *Name) // -------------- Argument = -1.25; - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); Argument = +1.25; - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = infinityf(); - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gasinhvec.cpp djgpp/tests/cygnus/tgen/gasinhvec.cpp --- djgpp.orig/tests/cygnus/tgen/gasinhvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gasinhvec.cpp 2018-01-02 19:39:24 +0000 @@ -87,8 +87,8 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -156,8 +156,8 @@ GenFltVector(char *Name) _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gasinvec.cpp djgpp/tests/cygnus/tgen/gasinvec.cpp --- djgpp.orig/tests/cygnus/tgen/gasinvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gasinvec.cpp 2018-01-02 19:39:24 +0000 @@ -69,22 +69,22 @@ GenDblVector(char *Name) // -------------- Argument = -1.1; - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); Argument = +1.1; - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = infinity(); - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); @@ -137,22 +137,22 @@ GenFltVector(char *Name) // -------------- Argument = -1.1; - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); Argument = +1.1; - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = infinity(); - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gatan2vec.cpp djgpp/tests/cygnus/tgen/gatan2vec.cpp --- djgpp.orig/tests/cygnus/tgen/gatan2vec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gatan2vec.cpp 2018-01-02 19:39:24 +0000 @@ -161,14 +161,14 @@ GenDblVector(char *Name) Write2Vector(DBL_MEAS_BIT, ArgY, ArgX, Expected, __NO_ERROR_); ArgY = 1.0; - ArgX = nan(); - Expected = nan(); + ArgX = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); Write2Vector(DBL_MEAS_BIT, ArgY, ArgX, Expected, __NO_ERROR_); - ArgY = nan(); + ArgY = nan(DBL_NAN); ArgX = infinity(); - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); Write2Vector(DBL_MEAS_BIT, ArgY, ArgX, Expected, __NO_ERROR_); @@ -329,14 +329,14 @@ GenFltVector(char *Name) Write2Vector(FLT_MEAS_BIT, ArgY, ArgX, Expected, __NO_ERROR_); ArgY = 1.0; - ArgX = nan(); - Expected = nan(); + ArgX = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); Write2Vector(FLT_MEAS_BIT, ArgY, ArgX, Expected, __NO_ERROR_); - ArgY = nan(); + ArgY = nan(FLT_NAN); ArgX = infinityf(); - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); Write2Vector(FLT_MEAS_BIT, ArgY, ArgX, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gatanhvec.cpp djgpp/tests/cygnus/tgen/gatanhvec.cpp --- djgpp.orig/tests/cygnus/tgen/gatanhvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gatanhvec.cpp 2018-01-02 19:39:24 +0000 @@ -61,7 +61,7 @@ GenDblVector(char *Name) // -------------- Argument = -1.25; - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); @@ -73,7 +73,7 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); Argument = 1.25; - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); @@ -85,25 +85,25 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); Argument = -infinity(); - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); Argument = infinity(); - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -150,7 +150,7 @@ GenFltVector(char *Name) // -------------- Argument = -1.25; - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); @@ -162,7 +162,7 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); Argument = 1.25; - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); @@ -174,25 +174,25 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); Argument = -infinityf(); - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); Argument = infinityf(); - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gatanvec.cpp djgpp/tests/cygnus/tgen/gatanvec.cpp --- djgpp.orig/tests/cygnus/tgen/gatanvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gatanvec.cpp 2018-01-02 19:39:24 +0000 @@ -80,13 +80,13 @@ GenDblVector(char *Name) _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -161,13 +161,13 @@ GenFltVector(char *Name) _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gcoshvec.cpp djgpp/tests/cygnus/tgen/gcoshvec.cpp --- djgpp.orig/tests/cygnus/tgen/gcoshvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gcoshvec.cpp 2018-01-02 19:39:24 +0000 @@ -91,15 +91,15 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, ERANGE); _fpreset(); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); _fpreset(); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -181,15 +181,15 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, ERANGE); _fpreset(); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); _fpreset(); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gcosvec.cpp djgpp/tests/cygnus/tgen/gcosvec.cpp --- djgpp.orig/tests/cygnus/tgen/gcosvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gcosvec.cpp 2018-01-02 19:53:24 +0000 @@ -68,25 +68,25 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = -infinity(); - Expected = -nan(); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = +infinity(); - Expected = -nan(); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -146,25 +146,25 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = -infinityf(); - Expected = -nan(); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = +infinityf(); - Expected = -nan(); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/genmathv.h djgpp/tests/cygnus/tgen/genmathv.h --- djgpp.orig/tests/cygnus/tgen/genmathv.h 2003-11-14 10:33:14 +0000 +++ djgpp/tests/cygnus/tgen/genmathv.h 2018-01-02 19:46:02 +0000 @@ -6,6 +6,9 @@ # else # define _GEN_MATHV_H_ +#define DBL_NAN "0x7FF8000000000000" +#define FLT_NAN "0x7FC00000" + #define __NO_ERROR_ 0 #define EQUAL(s1, s2) (strcmp(s1, s2) == 0) diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gexpvec.cpp djgpp/tests/cygnus/tgen/gexpvec.cpp --- djgpp.orig/tests/cygnus/tgen/gexpvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gexpvec.cpp 2018-01-02 19:39:24 +0000 @@ -103,14 +103,14 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -200,14 +200,14 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gfmodvec.cpp djgpp/tests/cygnus/tgen/gfmodvec.cpp --- djgpp.orig/tests/cygnus/tgen/gfmodvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gfmodvec.cpp 2018-01-02 20:22:06 +0000 @@ -94,7 +94,7 @@ GenDblVector(char *Name) Write2Vector(DBL_MEAS_BIT, ArgX, ArgY, Expected, Err); \ _fpreset(); \ } - NextAns = nan(); + NextAns = nan(DBL_NAN); _fpreset(); NEXT_DBL_VECTOR(0, 0, NextAns, EDOM) @@ -104,7 +104,7 @@ GenDblVector(char *Name) NextAns = 0.0; NEXT_DBL_VECTOR(DBL_MAX, DBL_MAX, NextAns, __NO_ERROR_) - NextAns = nan(); + NextAns = nan(DBL_NAN); _fpreset(); NEXT_DBL_VECTOR(DBL_MAX, 0, NextAns, EDOM) @@ -114,21 +114,21 @@ GenDblVector(char *Name) NextAns = DBL_MIN; NEXT_DBL_VECTOR(DBL_MIN, DBL_MAX, NextAns, __NO_ERROR_) - NextAns = -nan(); + NextAns = -nan(DBL_NAN); _fpreset(); NEXT_DBL_VECTOR(infinity(), infinity(), NextAns, __NO_ERROR_) - NextAns = -nan(); + NextAns = -nan(DBL_NAN); _fpreset(); NEXT_DBL_VECTOR(-infinity(), -infinity(), NextAns, __NO_ERROR_) - NextAns = nan(); + NextAns = nan(DBL_NAN); _fpreset(); - NEXT_DBL_VECTOR(nan(), nan(), NextAns, __NO_ERROR_) + NEXT_DBL_VECTOR(nan(DBL_NAN), nan(DBL_NAN), NextAns, __NO_ERROR_) - NextAns = nan(); + NextAns = nan(DBL_NAN); _fpreset(); - NEXT_DBL_VECTOR(infinity(), nan(), NextAns, __NO_ERROR_) + NEXT_DBL_VECTOR(infinity(), nan(DBL_NAN), NextAns, __NO_ERROR_) // Generate last lines (code lines) of file @@ -198,7 +198,7 @@ GenFltVector(char *Name) Write2Vector(FLT_MEAS_BIT, ArgX, ArgY, Expected, Err); \ _fpreset(); \ } - NextAns = nan(); + NextAns = nan(FLT_NAN); _fpreset(); NEXT_FLT_VECTOR(0, 0, NextAns, EDOM) @@ -208,7 +208,7 @@ GenFltVector(char *Name) NextAns = 0.0; NEXT_FLT_VECTOR(FLT_MAX, FLT_MAX, NextAns, __NO_ERROR_) - NextAns = nan(); + NextAns = nan(FLT_NAN); _fpreset(); NEXT_FLT_VECTOR(FLT_MAX, 0, NextAns, EDOM) @@ -218,21 +218,21 @@ GenFltVector(char *Name) NextAns = FLT_MIN; NEXT_FLT_VECTOR(FLT_MIN, FLT_MAX, NextAns, __NO_ERROR_) - NextAns = -nan(); + NextAns = -nan(FLT_NAN); _fpreset(); NEXT_FLT_VECTOR(infinityf(), infinityf(), NextAns, __NO_ERROR_) - NextAns = -nan(); + NextAns = -nan(FLT_NAN); _fpreset(); NEXT_FLT_VECTOR(-infinityf(), -infinityf(), NextAns, __NO_ERROR_) - NextAns = nan(); + NextAns = nan(FLT_NAN); _fpreset(); - NEXT_FLT_VECTOR(nan(), nan(), NextAns, __NO_ERROR_) + NEXT_FLT_VECTOR(nan(FLT_NAN), nan(FLT_NAN), NextAns, __NO_ERROR_) - NextAns = nan(); + NextAns = nan(FLT_NAN); _fpreset(); - NEXT_FLT_VECTOR(infinity(), nan(), NextAns, __NO_ERROR_) + NEXT_FLT_VECTOR(infinity(), nan(FLT_NAN), NextAns, __NO_ERROR_) // Generate last lines (code lines) of file diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gfrexpvec.cpp djgpp/tests/cygnus/tgen/gfrexpvec.cpp --- djgpp.orig/tests/cygnus/tgen/gfrexpvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gfrexpvec.cpp 2018-01-02 20:23:44 +0000 @@ -89,7 +89,7 @@ GenDblVector(char *Name) NextFrac = xtod(xfrexp(DBL_MAX, NextInt)); NEXT_DBL_VECTOR(DBL_MAX, NextInt, NextFrac, __NO_ERROR_); - NEXT_DBL_VECTOR(nan(), 0.0, nan(), __NO_ERROR_); + NEXT_DBL_VECTOR(nan(DBL_NAN), 0.0, nan(DBL_NAN), __NO_ERROR_); NEXT_DBL_VECTOR(infinity(), 0.0, infinity(), __NO_ERROR_); // Generate last lines (code lines) of file @@ -162,7 +162,7 @@ GenFltVector(char *Name) NextFrac = xtod(xfrexp(FLT_MAX, NextInt)); NEXT_FLT_VECTOR(FLT_MAX, NextInt, NextFrac, __NO_ERROR_); - NEXT_FLT_VECTOR(nan(), 0.0, nan(), __NO_ERROR_); + NEXT_FLT_VECTOR(nan(FLT_NAN), 0.0, nan(FLT_NAN), __NO_ERROR_); NEXT_FLT_VECTOR(infinity(), 0.0, infinity(), __NO_ERROR_); // Generate last lines (code lines) of file diff -aprNU3 djgpp.orig/tests/cygnus/tgen/ggammavec.cpp djgpp/tests/cygnus/tgen/ggammavec.cpp --- djgpp.orig/tests/cygnus/tgen/ggammavec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/ggammavec.cpp 2018-01-02 19:39:24 +0000 @@ -93,8 +93,8 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -171,8 +171,8 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/ghypotvec.cpp djgpp/tests/cygnus/tgen/ghypotvec.cpp --- djgpp.orig/tests/cygnus/tgen/ghypotvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/ghypotvec.cpp 2018-01-02 20:25:46 +0000 @@ -108,11 +108,11 @@ GenDblVector(char *Name) NextAns = infinity(); NEXT_DBL_VECTOR(infinity(), infinity(), NextAns, ERANGE) - NextAns = nan(); - NEXT_DBL_VECTOR(nan(), nan(), NextAns, __NO_ERROR_) + NextAns = nan(DBL_NAN); + NEXT_DBL_VECTOR(nan(DBL_NAN), nan(DBL_NAN), NextAns, __NO_ERROR_) - NextAns = nan(); - NEXT_DBL_VECTOR(infinity(), nan(), NextAns, __NO_ERROR_) + NextAns = nan(DBL_NAN); + NEXT_DBL_VECTOR(infinity(), nan(DBL_NAN), NextAns, __NO_ERROR_) // Generate last lines (code lines) of file @@ -197,11 +197,11 @@ GenFltVector(char *Name) NextAns = infinityf(); NEXT_FLT_VECTOR(infinityf(), infinityf(), NextAns, ERANGE) - NextAns = nan(); - NEXT_FLT_VECTOR(nan(), nan(), NextAns, __NO_ERROR_) + NextAns = nan(FLT_NAN); + NEXT_FLT_VECTOR(nan(FLT_NAN), nan(FLT_NAN), NextAns, __NO_ERROR_) - NextAns = nan(); - NEXT_FLT_VECTOR(infinity(), nan(), NextAns, __NO_ERROR_) + NextAns = nan(FLT_NAN); + NEXT_FLT_VECTOR(infinity(), nan(FLT_NAN), NextAns, __NO_ERROR_) // Generate last lines (code lines) of file diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gldexpvec.cpp djgpp/tests/cygnus/tgen/gldexpvec.cpp --- djgpp.orig/tests/cygnus/tgen/gldexpvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gldexpvec.cpp 2018-01-02 19:39:24 +0000 @@ -139,15 +139,15 @@ GenDblVector(char *Name) _fpreset(); Write2Vector(DBL_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); - ArgX = nan(); + ArgX = nan(DBL_NAN); ArgY = 2047; - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); Write2Vector(DBL_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); - ArgX = -nan(); + ArgX = -nan(DBL_NAN); ArgY = -2047; - Expected = -nan(); + Expected = -nan(DBL_NAN); _fpreset(); Write2Vector(DBL_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); @@ -265,15 +265,15 @@ GenFltVector(char *Name) _fpreset(); Write2Vector(FLT_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); - ArgX = nan(); + ArgX = nan(FLT_NAN); ArgY = 2047; - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); Write2Vector(FLT_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); - ArgX = -nan(); + ArgX = -nan(FLT_NAN); ArgY = -2047; - Expected = -nan(); + Expected = -nan(FLT_NAN); _fpreset(); Write2Vector(DBL_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/glog10vec.cpp djgpp/tests/cygnus/tgen/glog10vec.cpp --- djgpp.orig/tests/cygnus/tgen/glog10vec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/glog10vec.cpp 2018-01-02 19:39:24 +0000 @@ -101,14 +101,14 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -200,14 +200,14 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/glog1pvec.cpp djgpp/tests/cygnus/tgen/glog1pvec.cpp --- djgpp.orig/tests/cygnus/tgen/glog1pvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/glog1pvec.cpp 2018-01-02 19:39:24 +0000 @@ -101,14 +101,14 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -200,14 +200,14 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/glog2vec.cpp djgpp/tests/cygnus/tgen/glog2vec.cpp --- djgpp.orig/tests/cygnus/tgen/glog2vec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/glog2vec.cpp 2018-01-02 19:39:24 +0000 @@ -108,14 +108,14 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -213,14 +213,14 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/glogvec.cpp djgpp/tests/cygnus/tgen/glogvec.cpp --- djgpp.orig/tests/cygnus/tgen/glogvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/glogvec.cpp 2018-01-02 19:39:24 +0000 @@ -101,14 +101,14 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -200,14 +200,14 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gmiscvec.cpp djgpp/tests/cygnus/tgen/gmiscvec.cpp --- djgpp.orig/tests/cygnus/tgen/gmiscvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gmiscvec.cpp 2018-01-02 19:39:24 +0000 @@ -161,7 +161,7 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, errno); _fpreset(); - Argument = nan(); + Argument = nan(DBL_NAN); if (EQUAL(Name, StrCeil)) { Expected = Argument; @@ -180,7 +180,7 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, errno); _fpreset(); - Argument = -nan(); + Argument = -nan(DBL_NAN); if (EQUAL(Name, StrCeil)) { Expected = Argument; @@ -321,7 +321,7 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, errno); _fpreset(); - Argument = nan(); + Argument = nan(FLT_NAN); if (EQUAL(Name, StrCeilf)) { Expected = Argument; @@ -340,7 +340,7 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, errno); _fpreset(); - Argument = -nan(); + Argument = -nan(FLT_NAN); if (EQUAL(Name, StrCeilf)) { Expected = Argument; diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gmodfvec.cpp djgpp/tests/cygnus/tgen/gmodfvec.cpp --- djgpp.orig/tests/cygnus/tgen/gmodfvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gmodfvec.cpp 2018-01-02 20:28:28 +0000 @@ -101,7 +101,7 @@ GenDblVector(char *Name) NEXT_DBL_VECTOR(DBL_MIN, 0.0, DBL_MIN, __NO_ERROR_); NEXT_DBL_VECTOR(DBL_MAX, DBL_MAX, 0.0, __NO_ERROR_); - NEXT_DBL_VECTOR(nan(), nan(), 0.0, __NO_ERROR_); + NEXT_DBL_VECTOR(nan(DBL_NAN), nan(DBL_NAN), 0.0, __NO_ERROR_); NEXT_DBL_VECTOR(infinity(), infinity(), 0.0, __NO_ERROR_); // Generate last lines (code lines) of file @@ -186,7 +186,7 @@ GenFltVector(char *Name) NEXT_FLT_VECTOR(FLT_MIN, 0.0, FLT_MIN, __NO_ERROR_); NEXT_FLT_VECTOR(FLT_MAX, FLT_MAX, 0.0, __NO_ERROR_); - NEXT_FLT_VECTOR(nan(), nan(), 0.0, __NO_ERROR_); + NEXT_FLT_VECTOR(nan(FLT_NAN), nan(FLT_NAN), 0.0, __NO_ERROR_); NEXT_FLT_VECTOR(infinityf(), infinityf(), 0.0, __NO_ERROR_); // Generate last lines (code lines) of file diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gpowvec.cpp djgpp/tests/cygnus/tgen/gpowvec.cpp --- djgpp.orig/tests/cygnus/tgen/gpowvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gpowvec.cpp 2018-01-02 19:39:24 +0000 @@ -115,7 +115,7 @@ GenDblVector(char *Name) ArgX = -1.0; ArgY = infinity(); - Expected = -nan(); + Expected = -nan(DBL_NAN); _fpreset(); Write2Vector(DBL_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); @@ -127,7 +127,7 @@ GenDblVector(char *Name) ArgX = -1.0; ArgY = -infinity(); - Expected = -nan(); + Expected = -nan(DBL_NAN); _fpreset(); Write2Vector(DBL_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); @@ -180,14 +180,14 @@ GenDblVector(char *Name) Write2Vector(DBL_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); ArgX = 1.0; - ArgY = nan(); - Expected = nan(); + ArgY = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); Write2Vector(DBL_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); - ArgX = nan(); + ArgX = nan(DBL_NAN); ArgY = infinity(); - Expected = nan(); + Expected = nan(DBL_NAN); _fpreset(); Write2Vector(DBL_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); @@ -286,7 +286,7 @@ GenFltVector(char *Name) ArgX = -1.0; ArgY = infinityf(); - Expected = -nan(); + Expected = -nan(FLT_NAN); _fpreset(); Write2Vector(FLT_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); @@ -298,7 +298,7 @@ GenFltVector(char *Name) ArgX = -1.0; ArgY = -infinityf(); - Expected = -nan(); + Expected = -nan(FLT_NAN); _fpreset(); Write2Vector(FLT_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); @@ -351,14 +351,14 @@ GenFltVector(char *Name) Write2Vector(FLT_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); ArgX = 1.0; - ArgY = nan(); - Expected = nan(); + ArgY = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); Write2Vector(FLT_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); - ArgX = nan(); + ArgX = nan(FLT_NAN); ArgY = infinityf(); - Expected = nan(); + Expected = nan(FLT_NAN); _fpreset(); Write2Vector(FLT_MEAS_BIT, ArgX, ArgY, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gsinhvec.cpp djgpp/tests/cygnus/tgen/gsinhvec.cpp --- djgpp.orig/tests/cygnus/tgen/gsinhvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gsinhvec.cpp 2018-01-02 19:39:24 +0000 @@ -88,14 +88,14 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -172,14 +172,14 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gsinvec.cpp djgpp/tests/cygnus/tgen/gsinvec.cpp --- djgpp.orig/tests/cygnus/tgen/gsinvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gsinvec.cpp 2018-01-02 19:39:24 +0000 @@ -68,23 +68,23 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = -infinity(); - Expected = -nan(); + Expected = -nan(DBL_NAN); _fpreset(); Argument = +infinity(); - Expected = -nan(); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -144,25 +144,25 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = -infinityf(); - Expected = -nan(); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = +infinityf(); - Expected = -nan(); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gsqrtvec.cpp djgpp/tests/cygnus/tgen/gsqrtvec.cpp --- djgpp.orig/tests/cygnus/tgen/gsqrtvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gsqrtvec.cpp 2018-01-02 19:39:24 +0000 @@ -66,7 +66,7 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = -1.0; - Expected = -nan(); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, EDOM); @@ -77,14 +77,14 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -137,7 +137,7 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = -1.0; - Expected = -nan(); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, EDOM); @@ -148,14 +148,14 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gtanhvec.cpp djgpp/tests/cygnus/tgen/gtanhvec.cpp --- djgpp.orig/tests/cygnus/tgen/gtanhvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gtanhvec.cpp 2018-01-02 19:39:24 +0000 @@ -75,14 +75,14 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -140,14 +140,14 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); diff -aprNU3 djgpp.orig/tests/cygnus/tgen/gtanvec.cpp djgpp/tests/cygnus/tgen/gtanvec.cpp --- djgpp.orig/tests/cygnus/tgen/gtanvec.cpp 1999-04-04 08:13:40 +0000 +++ djgpp/tests/cygnus/tgen/gtanvec.cpp 2018-01-02 19:39:24 +0000 @@ -70,25 +70,25 @@ GenDblVector(char *Name) WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = -infinity(); - Expected = -nan(); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = +infinity(); - Expected = -nan(); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(DBL_NAN); + Expected = nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(DBL_NAN); + Expected = -nan(DBL_NAN); _fpreset(); WriteVector(DBL_MEAS_BIT, Argument, Expected, __NO_ERROR_); @@ -147,25 +147,25 @@ GenFltVector(char *Name) WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = -infinityf(); - Expected = -nan(); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); Argument = +infinityf(); - Expected = -nan(); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = nan(); - Expected = nan(); + Argument = nan(FLT_NAN); + Expected = nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); - Argument = -nan(); - Expected = -nan(); + Argument = -nan(FLT_NAN); + Expected = -nan(FLT_NAN); _fpreset(); WriteVector(FLT_MEAS_BIT, Argument, Expected, __NO_ERROR_); --------------090808050105080406070109--