From: Jarkko Hietaniemi Date: Thu, 9 Aug 2001 13:21:51 +0000 (+0000) Subject: Introduce more floating point classifying APIs; X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=758a5d7997f283f8e3786c3e353533cc466d5004;p=p5sagit%2Fp5-mst-13.2.git Introduce more floating point classifying APIs; try to define (most importantly) Perl_is{inf,nan}(x). For this first cut, assume none such APIs exist in non-UNIXoid platforms-- this is of course too unkind: Win32 rumoredly has _fpclass() and _isnan(), and VMS/VOS very probably have some of the APIs available. The only thing Perl uses at the moment is Perl_isnan() (has been in use for a while now). NOTE: the Win32 and NetWare config_h.?c need regenerating. p4raw-id: //depot/perl@11618 --- diff --git a/Configure b/Configure index 98621ab..c6c4ff3 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Wed Aug 1 02:58:53 EET DST 2001 [metaconfig 3.0 PL70] +# Generated on Thu Aug 9 16:34:00 EET DST 2001 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <. +d_unordered (d_unordered.U): + This variable conditionally defines the HAS_UNORDERED symbol, which + indicates to the C program that the unordered() routine is available. + d_usleep (d_usleep.U): This variable conditionally defines HAS_USLEEP if usleep() is available to do high granularity sleeps. @@ -2156,6 +2196,14 @@ i_float (i_float.U): whether a C program may include to get symbols like DBL_MAX or DBL_MIN, i.e. machine dependent floating point values. +i_fp (i_fp.U): + This variable conditionally defines the I_FP symbol, and indicates + whether a C program should include . + +i_fp_class (i_fp_class.U): + This variable conditionally defines the I_FP_CLASS symbol, and indicates + whether a C program should include . + i_gdbm (i_gdbm.U): This variable conditionally defines the I_GDBM symbol, which indicates to the C program that exists and should diff --git a/Porting/config.sh b/Porting/config.sh index 4bf2b8b..17fca1c 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -8,7 +8,7 @@ # Package name : perl5 # Source directory : . -# Configuration time: Tue Jul 31 18:19:35 EET DST 2001 +# Configuration time: Thu Aug 9 16:48:44 EET DST 2001 # Configured by : jhi # Target system : osf1 alpha.hut.fi v4.0 878 alpha @@ -56,14 +56,14 @@ cat='cat' cc='cc' cccdlflags=' ' ccdlflags=' -Wl,-rpath,/opt/perl/lib/5.7.2/alpha-dec_osf/CORE' -ccflags='-std -fprm d -ieee -D_INTRINSICS -DLANGUAGE_C' +ccflags='-std -D_INTRINSICS -DLANGUAGE_C' ccflags_uselargefiles='' ccname='cc' ccsymbols='__alpha=1 __LANGUAGE_C__=1 __osf__=1 __unix__=1 _LONGLONG=1 _SYSTYPE_BSD=1 SYSTYPE_BSD=1 unix=1' ccversion='V5.6-082' cf_by='jhi' cf_email='yourname@yourhost.yourplace.com' -cf_time='Tue Jul 31 18:19:35 EET DST 2001' +cf_time='Thu Aug 9 16:48:44 EET DST 2001' charsize='1' chgrp='' chmod='chmod' @@ -77,7 +77,7 @@ cpio='' cpp='cpp' cpp_stuff='42' cppccsymbols='LANGUAGE_C=1' -cppflags='-std -ieee -D_INTRINSICS -DLANGUAGE_C' +cppflags='-std -D_INTRINSICS -DLANGUAGE_C' cpplast='' cppminus='' cpprun='/usr/bin/cpp' @@ -120,6 +120,7 @@ d_charvspr='undef' d_chown='define' d_chroot='define' d_chsize='undef' +d_class='undef' d_closedir='define' d_cmsghdr_s='define' d_const='define' @@ -154,11 +155,17 @@ d_fd_macros='define' d_fd_set='define' d_fds_bits='define' d_fgetpos='define' +d_finite='define' +d_finitel='define' d_flexfnam='define' d_flock='define' d_flockproto='undef' d_fork='define' +d_fp_class='define' d_fpathconf='define' +d_fpclass='undef' +d_fpclassify='undef' +d_fpclassl='undef' d_fpos64_t='undef' d_frexpl='define' d_fs_data_s='undef' @@ -214,6 +221,8 @@ d_index='undef' d_inetaton='define' d_int64_t='undef' d_isascii='define' +d_isfinite='undef' +d_isinf='undef' d_isnan='define' d_isnanl='define' d_killpg='define' @@ -400,6 +409,7 @@ d_ualarm='define' d_umask='define' d_uname='define' d_union_semun='undef' +d_unordered='define' d_usleep='define' d_usleepproto='undef' d_ustat='define' @@ -485,6 +495,8 @@ i_dld='undef' i_dlfcn='define' i_fcntl='undef' i_float='define' +i_fp='define' +i_fp_class='define' i_gdbm='undef' i_grp='define' i_iconv='define' @@ -674,7 +686,7 @@ patchlevel='7' path_sep=':' perl5='perl' perl='' -perl_patchlevel='11497' +perl_patchlevel='11596' perladmin='yourname@yourhost.yourplace.com' perllibs='-lm -liconv -lutil' perlpath='/opt/perl/bin/perl' @@ -842,7 +854,7 @@ vendorlibexp='' vendorprefix='' vendorprefixexp='' version='5.7.2' -version_patchlevel_string='version 7 subversion 2 patch 11497' +version_patchlevel_string='version 7 subversion 2 patch 11596' versiononly='define' vi='' voidflags='15' @@ -872,7 +884,7 @@ PERL_SUBVERSION=2 PERL_API_REVISION=5 PERL_API_VERSION=5 PERL_API_SUBVERSION=0 -PERL_PATCHLEVEL=11497 +PERL_PATCHLEVEL=11596 PERL_CONFIG_SH=true # Variables propagated from previous config.sh file. pp_sys_cflags='ccflags="$ccflags -DNO_EFF_ONLY_OK"' diff --git a/Porting/config_H b/Porting/config_H index 6008f4c..896a878 100644 --- a/Porting/config_H +++ b/Porting/config_H @@ -17,7 +17,7 @@ /* * Package name : perl5 * Source directory : . - * Configuration time: Tue Jul 31 18:19:35 EET DST 2001 + * Configuration time: Thu Aug 9 16:48:44 EET DST 2001 * Configured by : jhi * Target system : osf1 alpha.hut.fi v4.0 878 alpha */ @@ -1210,6 +1210,24 @@ #define CASTNEGFLOAT /**/ #define CASTFLAGS 0 /**/ +/* HAS_CLASS: + * This symbol, if defined, indicates that the class routine is + * available to classify doubles. Available for example in AIX. + * The returned values are defined in and are: + * + * FP_PLUS_NORM Positive normalized, nonzero + * FP_MINUS_NORM Negative normalized, nonzero + * FP_PLUS_DENORM Positive denormalized, nonzero + * FP_MINUS_DENORM Negative denormalized, nonzero + * FP_PLUS_ZERO +0.0 + * FP_MINUS_ZERO -0.0 + * FP_PLUS_INF +INF + * FP_MINUS_INF -INF + * FP_NANS Signaling Not a Number (NaNS) + * FP_NANQ Quiet Not a Number (NaNQ) + */ +/*#define HAS_CLASS / **/ + /* VOID_CLOSEDIR: * This symbol, if defined, indicates that the closedir() routine * does not return a value. @@ -1304,12 +1322,93 @@ */ #define HAS_FD_SET /**/ +/* HAS_FINITE: + * This symbol, if defined, indicates that the finite routine is + * available to check whether a double is finite (non-infinity non-NaN). + */ +#define HAS_FINITE /**/ + +/* HAS_FINITEL: + * This symbol, if defined, indicates that the finitel routine is + * available to check whether a long double is finite + * (non-infinity non-NaN). + */ +#define HAS_FINITEL /**/ + /* FLEXFILENAMES: * This symbol, if defined, indicates that the system supports filenames * longer than 14 characters. */ #define FLEXFILENAMES /**/ +/* HAS_FP_CLASS: + * This symbol, if defined, indicates that the fp_class routine is + * available to classify doubles. Available for example in Digital UNIX. + * The returned values are defined in and are: + * + * FP_SNAN Signaling NaN (Not-a-Number) + * FP_QNAN Quiet NaN (Not-a-Number) + * FP_POS_INF +infinity + * FP_NEG_INF -infinity + * FP_POS_NORM Positive normalized + * FP_NEG_NORM Negative normalized + * FP_POS_DENORM Positive denormalized + * FP_NEG_DENORM Negative denormalized + * FP_POS_ZERO +0.0 (positive zero) + * FP_NEG_ZERO -0.0 (negative zero) + */ +#define HAS_FP_CLASS /**/ + +/* HAS_FPCLASS: + * This symbol, if defined, indicates that the fpclass routine is + * available to classify doubles. Available for example in Solaris/SVR4. + * The returned values are defined in and are: + * + * FP_SNAN signaling NaN + * FP_QNAN quiet NaN + * FP_NINF negative infinity + * FP_PINF positive infinity + * FP_NDENORM negative denormalized non-zero + * FP_PDENORM positive denormalized non-zero + * FP_NZERO negative zero + * FP_PZERO positive zero + * FP_NNORM negative normalized non-zero + * FP_PNORM positive normalized non-zero + */ +/*#define HAS_FPCLASS / **/ + +/* HAS_FPCLASSIFY: + * This symbol, if defined, indicates that the fpclassify routine is + * available to classify doubles. Available for example in HP-UX. + * The returned values are defined in and are + * + * FP_NORMAL Normalized + * FP_ZERO Zero + * FP_INFINITE Infinity + * FP_SUBNORMAL Denormalized + * FP_NAN NaN + * + */ +/*#define HAS_FPCLASSIFY / **/ + +/* HAS_FPCLASSL: + * This symbol, if defined, indicates that the fpclassl routine is + * available to classify long doubles. Available for example in IRIX. + * The returned values are defined in and are: + * + * FP_SNAN signaling NaN + * FP_QNAN quiet NaN + * FP_NINF negative infinity + * FP_PINF positive infinity + * FP_NDENORM negative denormalized non-zero + * FP_PDENORM positive denormalized non-zero + * FP_NZERO negative zero + * FP_PZERO positive zero + * FP_NNORM negative normalized non-zero + * FP_PNORM positive normalized non-zero + */ +/*#define HAS_FPCLASSL / **/ + /* HAS_FPOS64_T: * This symbol will be defined if the C compiler supports fpos64_t. */ @@ -1638,6 +1737,18 @@ */ #define HAS_ISASCII /**/ +/* HAS_ISFINITE: + * This symbol, if defined, indicates that the isfinite routine is + * available to check whether a double is finite (non-infinity non-NaN). + */ +/*#define HAS_ISFINITE / **/ + +/* HAS_ISINF: + * This symbol, if defined, indicates that the isinf routine is + * available to check whether a double is an infinity. + */ +/*#define HAS_ISINF / **/ + /* HAS_ISNAN: * This symbol, if defined, indicates that the isnan routine is * available to check whether a double is a NaN. @@ -2262,6 +2373,13 @@ #define USE_SEMCTL_SEMUN /**/ #define USE_SEMCTL_SEMID_DS /**/ +/* HAS_UNORDERED: + * This symbol, if defined, indicates that the unordered routine is + * available to check whether two doubles are unordered + * (effectively: whether either of them is NaN) + */ +#define HAS_UNORDERED /**/ + /* HAS_USTAT: * This symbol, if defined, indicates that the ustat system call is * available to query file system statistics by dev_t. @@ -2408,6 +2526,12 @@ #define DB_VERSION_MINOR_CFG 0 /**/ #define DB_VERSION_PATCH_CFG 0 /**/ +/* I_FP_CLASS: + * This symbol, if defined, indicates that exists and + * should be included. + */ +#define I_FP_CLASS /**/ + /* I_GRP: * This symbol, if defined, indicates to the C program that it should * include . @@ -3451,6 +3575,12 @@ */ /*#define HAS_USLEEP_PROTO / **/ +/* I_FP: + * This symbol, if defined, indicates that exists and + * should be included. + */ +#define I_FP /**/ + /* I_LANGINFO: * This symbol, if defined, indicates that exists and * should be included. diff --git a/config_h.SH b/config_h.SH index e3c4a06..9290b75 100644 --- a/config_h.SH +++ b/config_h.SH @@ -1230,6 +1230,24 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_castneg CASTNEGFLOAT /**/ #define CASTFLAGS $castflags /**/ +/* HAS_CLASS: + * This symbol, if defined, indicates that the class routine is + * available to classify doubles. Available for example in AIX. + * The returned values are defined in and are: + * + * FP_PLUS_NORM Positive normalized, nonzero + * FP_MINUS_NORM Negative normalized, nonzero + * FP_PLUS_DENORM Positive denormalized, nonzero + * FP_MINUS_DENORM Negative denormalized, nonzero + * FP_PLUS_ZERO +0.0 + * FP_MINUS_ZERO -0.0 + * FP_PLUS_INF +INF + * FP_MINUS_INF -INF + * FP_NANS Signaling Not a Number (NaNS) + * FP_NANQ Quiet Not a Number (NaNQ) + */ +#$d_class HAS_CLASS /**/ + /* VOID_CLOSEDIR: * This symbol, if defined, indicates that the closedir() routine * does not return a value. @@ -1324,12 +1342,93 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_fd_set HAS_FD_SET /**/ +/* HAS_FINITE: + * This symbol, if defined, indicates that the finite routine is + * available to check whether a double is finite (non-infinity non-NaN). + */ +#$d_finite HAS_FINITE /**/ + +/* HAS_FINITEL: + * This symbol, if defined, indicates that the finitel routine is + * available to check whether a long double is finite + * (non-infinity non-NaN). + */ +#$d_finitel HAS_FINITEL /**/ + /* FLEXFILENAMES: * This symbol, if defined, indicates that the system supports filenames * longer than 14 characters. */ #$d_flexfnam FLEXFILENAMES /**/ +/* HAS_FP_CLASS: + * This symbol, if defined, indicates that the fp_class routine is + * available to classify doubles. Available for example in Digital UNIX. + * The returned values are defined in and are: + * + * FP_SNAN Signaling NaN (Not-a-Number) + * FP_QNAN Quiet NaN (Not-a-Number) + * FP_POS_INF +infinity + * FP_NEG_INF -infinity + * FP_POS_NORM Positive normalized + * FP_NEG_NORM Negative normalized + * FP_POS_DENORM Positive denormalized + * FP_NEG_DENORM Negative denormalized + * FP_POS_ZERO +0.0 (positive zero) + * FP_NEG_ZERO -0.0 (negative zero) + */ +#$d_fp_class HAS_FP_CLASS /**/ + +/* HAS_FPCLASS: + * This symbol, if defined, indicates that the fpclass routine is + * available to classify doubles. Available for example in Solaris/SVR4. + * The returned values are defined in and are: + * + * FP_SNAN signaling NaN + * FP_QNAN quiet NaN + * FP_NINF negative infinity + * FP_PINF positive infinity + * FP_NDENORM negative denormalized non-zero + * FP_PDENORM positive denormalized non-zero + * FP_NZERO negative zero + * FP_PZERO positive zero + * FP_NNORM negative normalized non-zero + * FP_PNORM positive normalized non-zero + */ +#$d_fpclass HAS_FPCLASS /**/ + +/* HAS_FPCLASSIFY: + * This symbol, if defined, indicates that the fpclassify routine is + * available to classify doubles. Available for example in HP-UX. + * The returned values are defined in and are + * + * FP_NORMAL Normalized + * FP_ZERO Zero + * FP_INFINITE Infinity + * FP_SUBNORMAL Denormalized + * FP_NAN NaN + * + */ +#$d_fpclassify HAS_FPCLASSIFY /**/ + +/* HAS_FPCLASSL: + * This symbol, if defined, indicates that the fpclassl routine is + * available to classify long doubles. Available for example in IRIX. + * The returned values are defined in and are: + * + * FP_SNAN signaling NaN + * FP_QNAN quiet NaN + * FP_NINF negative infinity + * FP_PINF positive infinity + * FP_NDENORM negative denormalized non-zero + * FP_PDENORM positive denormalized non-zero + * FP_NZERO negative zero + * FP_PZERO positive zero + * FP_NNORM negative normalized non-zero + * FP_PNORM positive normalized non-zero + */ +#$d_fpclassl HAS_FPCLASSL /**/ + /* HAS_FPOS64_T: * This symbol will be defined if the C compiler supports fpos64_t. */ @@ -1658,6 +1757,18 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_isascii HAS_ISASCII /**/ +/* HAS_ISFINITE: + * This symbol, if defined, indicates that the isfinite routine is + * available to check whether a double is finite (non-infinity non-NaN). + */ +#$d_isfinite HAS_ISFINITE /**/ + +/* HAS_ISINF: + * This symbol, if defined, indicates that the isinf routine is + * available to check whether a double is an infinity. + */ +#$d_isinf HAS_ISINF /**/ + /* HAS_ISNAN: * This symbol, if defined, indicates that the isnan routine is * available to check whether a double is a NaN. @@ -2282,6 +2393,13 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_semctl_semun USE_SEMCTL_SEMUN /**/ #$d_semctl_semid_ds USE_SEMCTL_SEMID_DS /**/ +/* HAS_UNORDERED: + * This symbol, if defined, indicates that the unordered routine is + * available to check whether two doubles are unordered + * (effectively: whether either of them is NaN) + */ +#$d_unordered HAS_UNORDERED /**/ + /* HAS_USTAT: * This symbol, if defined, indicates that the ustat system call is * available to query file system statistics by dev_t. @@ -2428,6 +2546,12 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #define DB_VERSION_MINOR_CFG $db_version_minor /**/ #define DB_VERSION_PATCH_CFG $db_version_patch /**/ +/* I_FP_CLASS: + * This symbol, if defined, indicates that exists and + * should be included. + */ +#$i_fp_class I_FP_CLASS /**/ + /* I_GRP: * This symbol, if defined, indicates to the C program that it should * include . @@ -3471,6 +3595,12 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_usleepproto HAS_USLEEP_PROTO /**/ +/* I_FP: + * This symbol, if defined, indicates that exists and + * should be included. + */ +#$i_fp I_FP /**/ + /* I_LANGINFO: * This symbol, if defined, indicates that exists and * should be included. diff --git a/configure.com b/configure.com index a4ff660..77c537a 100644 --- a/configure.com +++ b/configure.com @@ -5008,6 +5008,7 @@ $ WC "d_charvspr='undef'" $ WC "d_chown='define'" $ WC "d_chroot='undef'" $ WC "d_chsize='undef'" +$ WC "d_class='undef'" $ WC "d_cmsghdr_s='undef'" $ WC "d_const='define'" $ WC "d_crypt='define'" @@ -5038,11 +5039,17 @@ $ WC "d_fcntl='" + d_fcntl + "'" $ WC "d_fcntl_can_lock='" + d_fcntl_can_lock + "'" $ WC "d_fd_set='" + d_fd_set + "'" $ WC "d_fgetpos='define'" +$ WC "d_finite='undef'" +$ WC "d_finitel='undef'" $ WC "d_flexfnam='define'" $ WC "d_flock='undef'" $ WC "d_flockproto='undef'" $ WC "d_fork='undef'" +$ WC "d_fp_class='undef'" $ WC "d_fpathconf='" + d_fpathconf + "'" +$ WC "d_fpclass='undef'" +$ WC "d_fpclassify='undef'" +$ WC "d_fpclassl='undef'" $ WC "d_fpos64_t='" + d_fpos64_t + "'" $ WC "d_frexpl='" + d_frexpl + "'" $ WC "d_fs_data_s='undef'" @@ -5097,6 +5104,8 @@ $ WC "d_index='" + d_index + "'" $ WC "d_inetaton='undef'" $ WC "d_int64_t='" + d_int64_t + "'" $ WC "d_isascii='define'" +$ WC "d_isfinite='undef'" +$ WC "d_isinf='undef'" $ WC "d_isnan='" + d_isnan + "'" $ WC "d_isnanl='" + d_isnanl + "'" $ WC "d_killpg='undef'" @@ -5277,6 +5286,7 @@ $ WC "d_umask='define'" $ WC "d_uname='" + d_uname + "'" $ WC "d_union_semun='undef'" $ WC "d_unlink_all_versions='undef'" +$ WC "d_unordered='undef'" $ WC "d_usleep='undef'" $ WC "d_usleepproto='undef'" $ WC "d_ustat='undef'" @@ -5350,6 +5360,8 @@ $ WC "i_dirent='" + i_dirent + "'" $ WC "i_dlfcn='undef'" $ WC "i_fcntl='" + i_fcntl + "'" $ WC "i_float='define'" +$ WC "i_fp='undef'" +$ WC "i_fp_class='undef'" $ WC "i_grp='undef'" $ WC "i_iconv='" + i_iconv +"'" $ WC "i_ieeefp='undef'" diff --git a/epoc/config.sh b/epoc/config.sh index e628e1b..115587c 100644 --- a/epoc/config.sh +++ b/epoc/config.sh @@ -112,6 +112,7 @@ d_charvspr='undef' d_chown='undef' d_chroot='undef' d_chsize='undef' +d_class='undef' d_closedir='undef' d_cmsghdr_s='undef' d_cmsghdr_s='undef' @@ -147,11 +148,17 @@ d_fd_macros='undef' d_fd_set='define' d_fds_bits='undef' d_fgetpos='define' +d_finite='undef' +d_finitel='undef' d_flexfnam='define' d_flock='undef' d_flockproto='undef' d_fork='undef' +d_fp_class='undef' d_fpathconf='undef' +d_fpclass='undef' +d_fpclassify='undef' +d_fpclassl='undef' d_fpos64_t='undef' d_frexpl='undef' d_fseeko='undef' @@ -205,6 +212,8 @@ d_inetaton='define' d_int64_t='undef' d_iovec_s='undef' d_isascii='define' +d_isfinite='undef' +d_isinf='undef' d_isnan='define' d_isnanl='undef' d_killpg='undef' @@ -385,6 +394,7 @@ d_ualarm='undef' d_umask='undef' d_uname='undef' d_union_semun='undef' +d_unordered='undef' d_usleepproto='undef' d_vendorlib='undef' d_vfork='undef' @@ -448,6 +458,8 @@ i_dld='undef' i_dlfcn='undef' i_fcntl='define' i_float='undef' +i_fp='undef' +i_fp_class='undef' i_gdbm='undef' i_grp='undef' i_iconv='undef' diff --git a/hints/hpux.sh b/hints/hpux.sh index 3413503..6b93d80 100644 --- a/hints/hpux.sh +++ b/hints/hpux.sh @@ -452,3 +452,7 @@ EOM ;; esac EOCBU + +# fpclassify() is a macro, the library call is Fpclassify +d_fpclassify='define' + diff --git a/perl.h b/perl.h index 8269448..cba24be 100644 --- a/perl.h +++ b/perl.h @@ -1299,13 +1299,14 @@ typedef NVTYPE NV; # else # define Perl_frexp(x,y) ((long double)frexp((double)(x),y)) # endif -# ifdef HAS_ISNANL -# define Perl_isnan(x) isnanl(x) -# else -# ifdef HAS_ISNAN -# define Perl_isnan(x) isnan((double)(x)) -# else -# define Perl_isnan(x) ((x)!=(x)) +# ifndef Perl_isinf +# ifdef HAS_ISNANL +# define Perl_isnan(x) isnanl(x) +# endif +# endif +# ifndef Perl_isinf +# ifdef HAS_FINITEL +# define Perl_isinf(x) !(finitel(x)||Perl_isnan(x)) # endif # endif #else @@ -1332,10 +1333,139 @@ typedef NVTYPE NV; # define Perl_fmod fmod # define Perl_modf(x,y) modf(x,y) # define Perl_frexp(x,y) frexp(x,y) +#endif + +/* rumor has it that Win32 has _fpclass() */ + +#if !defined(Perl_fp_class) && (defined(HAS_FPCLASS)||defined(HAS_FPCLASSL)) +# ifdef I_IEEFP +# include +# endif +# ifdef I_FP +# include +# endif +# if defined(USE_LONG_DOUBLE) && defined(HAS_FPCLASSL) +# define Perl_fp_class() fpclassl(x) +# else +# define Perl_fp_class() fpclass(x) +# endif +# define Perl_fp_class_snan(x) (Perl_fp_class(x)==FP_CLASS_SNAN) +# define Perl_fp_class_qnan(x) (Perl_fp_class(x)==FP_CLASS_QNAN) +# define Perl_fp_class_nan(x) (Perl_fp_class(x)==FP_CLASS_SNAN||Perl_fp_class(x)==FP_CLASS_QNAN) +# define Perl_fp_class_ninf(x) (Perl_fp_class(x)==FP_CLASS_NINF) +# define Perl_fp_class_pinf(x) (Perl_fp_class(x)==FP_CLASS_PINF) +# define Perl_fp_class_inf(x) (Perl_fp_class(x)==FP_CLASS_NINF||Perl_fp_class(x)==FP_CLASS_PINF) +# define Perl_fp_class_nnorm(x) (Perl_fp_class(x)==FP_CLASS_NNORM) +# define Perl_fp_class_pnorm(x) (Perl_fp_class(x)==FP_CLASS_PNORM) +# define Perl_fp_class_norm(x) (Perl_fp_class(x)==FP_CLASS_NNORM||Perl_fp_class(x)==FP_CLASS_PNORM) +# define Perl_fp_class_ndenorm(x) (Perl_fp_class(x)==FP_CLASS_NDENORM) +# define Perl_fp_class_pdenorm(x) (Perl_fp_class(x)==FP_CLASS_PDENORM) +# define Perl_fp_class_denorm(x) (Perl_fp_class(x)==FP_CLASS_NDENORM||Perl_fp_class(x)==FP_CLASS_PDENORM) +# define Perl_fp_class_nzero(x) (Perl_fp_class(x)==FP_CLASS_NZERO) +# define Perl_fp_class_pzero(x) (Perl_fp_class(x)==FP_CLASS_PZERO) +# define Perl_fp_class_zero(x) (Perl_fp_class(x)==FP_CLASS_NZERO||Perl_fp_class(x)==FP_CLASS_PZERO) +#endif + +#if !defined(Perl_fp_class) && defined(HAS_FP_CLASS) +# include +# if !defined(FP_SNAN) && defined(I_FP_CLASS) +# include +# endif +# define Perl_fp_class(x) fp_class(x) +# define Perl_fp_class_snan(x) (fp_class(x)==FP_SNAN) +# define Perl_fp_class_qnan(x) (fp_class(x)==FP_QNAN) +# define Perl_fp_class_nan(x) (fp_class(x)==FP_SNAN||fp_class(x)==FP_QNAN) +# define Perl_fp_class_ninf(x) (fp_class(x)==FP_NEG_INF) +# define Perl_fp_class_pinf(x) (fp_class(x)==FP_POS_INF) +# define Perl_fp_class_inf(x) (fp_class(x)==FP_NEG_INF||fp_class(x)==FP_POS_INF) +# define Perl_fp_class_nnorm(x) (fp_class(x)==FP_NEG_NORM) +# define Perl_fp_class_pnorm(x) (fp_class(x)==FP_POS_NORM) +# define Perl_fp_class_norm(x) (fp_class(x)==FP_NEG_NORM||fp_class(x)==FP_POS_NORM) +# define Perl_fp_class_ndenorm(x) (fp_class(x)==FP_NEG_DENORM) +# define Perl_fp_class_pdenorm(x) (fp_class(x)==FP_POS_DENORM) +# define Perl_fp_class_denorm(x) (fp_class(x)==FP_NEG_DENORM||fp_class(x)==FP_POS_DENORM) +# define Perl_fp_class_nzero(x) (fp_class(x)==FP_NEG_ZERO) +# define Perl_fp_class_pzero(x) (fp_class(x)==FP_POS_ZERO) +# define Perl_fp_class_zero(x) (fp_class(x)==FP_NEG_ZERO||fp_class(x)==FP_POS_ZERO) +#endif + +#if !defined(Perl_fp_class) && defined(HAS_FPCLASSIFY) +# include +# define Perl_fp_class(x) fpclassify(x) +# define Perl_fp_class_nan(x) (fp_classify(x)==FP_SNAN|FP|_fp_classify(x)==QNAN) +# define Perl_fp_class_inf(x) (fp_classify(x)==FP_INFINITE) +# define Perl_fp_class_norm(x) (fp_classify(x)==FP_NORMAL) +# define Perl_fp_class_denorm(x) (fp_classify(x)==FP_SUBNORMAL) +# define Perl_fp_class_zero(x) (fp_classify(x)==FP_ZERO) +#endif + +#if !defined(Perl_fp_class) && defined(HAS_CLASS) +# include +# ifndef _cplusplus +# define Perl_fp_class(x) class(x) +# else +# define Perl_fp_class(x) _class(x) +# endif +# define Perl_fp_class_snan(x) (Perl_fp_class(x)==FP_NANS) +# define Perl_fp_class_qnan(x) (Perl_fp_class(x)==FP_NANQ) +# define Perl_fp_class_nan(x) (Perl_fp_class(x)==FP_SNAN||Perl_fp_class(x)==FP_QNAN) +# define Perl_fp_class_ninf(x) (Perl_fp_class(x)==FP_MINUS_INF) +# define Perl_fp_class_pinf(x) (Perl_fp_class(x)==FP_PLUS_INF) +# define Perl_fp_class_inf(x) (Perl_fp_class(x)==FP_MINUS_INF||Perl_fp_class(x)==FP_PLUS_INF) +# define Perl_fp_class_nnorm(x) (Perl_fp_class(x)==FP_MINUS_NORM) +# define Perl_fp_class_pnorm(x) (Perl_fp_class(x)==FP_PLUS_NORM) +# define Perl_fp_class_norm(x) (Perl_fp_class(x)==FP_MINUS_NORM||Perl_fp_class(x)==FP_PLUS_NORM) +# define Perl_fp_class_ndenorm(x) (Perl_fp_class(x)==FP_MINUS_DENORM) +# define Perl_fp_class_pdenorm(x) (Perl_fp_class(x)==FP_PLUS_DENORM) +# define Perl_fp_class_denorm(x) (Perl_fp_class(x)==FP_MINUS_DENORM||Perl_fp_class(x)==FP_PLUS_DENORM) +# define Perl_fp_class_nzero(x) (Perl_fp_class(x)==FP_MINUS_ZERO) +# define Perl_fp_class_pzero(x) (Perl_fp_class(x)==FP_PLUS_ZERO) +# define Perl_fp_class_zero(x) (Perl_fp_class(x)==FP_MINUS_ZERO||Perl_fp_class(x)==FP_PLUS_ZERO) +#endif + +/* rumor has it that Win32 has _isnan() */ + +#ifndef Perl_isnan # ifdef HAS_ISNAN -# define Perl_isnan(x) isnan(x) +# define Perl_isnan(x) isnan((NV)x) # else -# define Perl_isnan(x) ((x)!=(x)) +# ifdef Perl_fp_class_nan +# define Perl_isnan(x) Perl_fp_class_nan(x) +# else +# ifdef HAS_UNORDERED +# define Perl_isnan(x) unordered((x), 0.0) +# else +# define Perl_isnan(x) ((x)!=(x)) +# endif +# endif +# endif +#endif + +#ifndef Perl_isinf +# ifdef HAS_ISINF +# define Perl_isinf(x) isinf((NV)x) +# else +# ifdef Perl_fp_class_inf +# define Perl_isinf(x) Perl_fp_class_inf(x) +# else +# define Perl_isinf(x) ((x)==NV_INF) +# endif +# endif +#endif + +#ifndef Perl_isfinite +# ifdef HAS_FINITE +# define Perl_isfinite(x) finite((NV)x) +# else +# ifdef HAS_ISFINITE +# define Perl_isfinite(x) isfinite(x) +# else +# ifdef Perl_fp_class_finite +# define Perl_isfinite(x) Perl_fp_class_finite(x) +# else +# define Perl_isfinite(x) !(Perl_is_inf(x)||Perl_is_nan(x)) +# endif +# endif # endif #endif diff --git a/pod/perltoc.pod b/pod/perltoc.pod index 2c00af4..3f86e67 100644 --- a/pod/perltoc.pod +++ b/pod/perltoc.pod @@ -1850,13 +1850,13 @@ ADDR,ADDRTYPE, getprotobynumber NUMBER, getservbyport PORT,PROTO, getpwent, getgrent, gethostent, getnetent, getprotoent, getservent, setpwent, setgrent, sethostent STAYOPEN, setnetent STAYOPEN, setprotoent STAYOPEN, setservent STAYOPEN, endpwent, endgrent, endhostent, endnetent, -endprotoent, endservent, getsockopt SOCKET,LEVEL,OPTNAME, glob EXPR, glob, -ioctl FILEHANDLE,FUNCTION,SCALAR, kill SIGNAL, LIST, link OLDFILE,NEWFILE, -lstat FILEHANDLE, lstat EXPR, lstat, msgctl ID,CMD,ARG, msgget KEY,FLAGS, -msgsnd ID,MSG,FLAGS, msgrcv ID,VAR,SIZE,TYPE,FLAGS, open FILEHANDLE,EXPR, -open FILEHANDLE, pipe READHANDLE,WRITEHANDLE, readlink EXPR, readlink, -select RBITS,WBITS,EBITS,TIMEOUT, semctl ID,SEMNUM,CMD,ARG, semget -KEY,NSEMS,FLAGS, semop KEY,OPSTRING, setgrent, setpgrp PID,PGRP, +endprotoent, endservent, exit EXPR, exit, getsockopt SOCKET,LEVEL,OPTNAME, +glob EXPR, glob, ioctl FILEHANDLE,FUNCTION,SCALAR, kill SIGNAL, LIST, link +OLDFILE,NEWFILE, lstat FILEHANDLE, lstat EXPR, lstat, msgctl ID,CMD,ARG, +msgget KEY,FLAGS, msgsnd ID,MSG,FLAGS, msgrcv ID,VAR,SIZE,TYPE,FLAGS, open +FILEHANDLE,EXPR, open FILEHANDLE, pipe READHANDLE,WRITEHANDLE, readlink +EXPR, readlink, select RBITS,WBITS,EBITS,TIMEOUT, semctl ID,SEMNUM,CMD,ARG, +semget KEY,NSEMS,FLAGS, semop KEY,OPSTRING, setgrent, setpgrp PID,PGRP, setpriority WHICH,WHO,PRIORITY, setpwent, setsockopt SOCKET,LEVEL,OPTNAME,OPTVAL, shmctl ID,CMD,ARG, shmget KEY,SIZE,FLAGS, shmread ID,VAR,POS,SIZE, shmwrite ID,STRING,POS,SIZE, sockatmark SOCKET, @@ -6003,50 +6003,6 @@ Source, Compiled Module Source, Perl Modules/Scripts =back -=head2 perldos - Perl under DOS, W31, W95. - -=over 4 - -=item SYNOPSIS - -=item DESCRIPTION - -=over 4 - -=item Prerequisites for Compiling Perl on DOS - -DJGPP, Pthreads - -=item Shortcomings of Perl under DOS - -=item Building Perl on DOS - -=item Testing Perl on DOS - -=item Installation of Perl on DOS - -=back - -=item BUILDING AND INSTALLING MODULES ON DOS - -=over 4 - -=item Building Prerequisites for Perl on DOS - -=item Unpacking CPAN Modules on DOS - -=item Building Non-XS Modules on DOS - -=item Building XS Modules on DOS - -=back - -=item AUTHOR - -=item SEE ALSO - -=back - =head2 perlepoc, README.epoc - Perl for EPOC =over 4 @@ -6917,48 +6873,6 @@ LIST, waitpid PID,FLAGS =back -=head2 perlwin32 - Perl under Win32 - -=over 4 - -=item SYNOPSIS - -=item DESCRIPTION - -=over 4 - -=item Setting Up Perl on Win32 - -Make, Command Shell, Borland C++, Microsoft Visual C++, Mingw32 with GCC - -=item Building - -=item Testing Perl on Win32 - -=item Installation of Perl on Win32 - -=item Usage Hints for Perl on Win32 - -Environment Variables, File Globbing, Using perl from the command line, -Building Extensions, Command-line Wildcard Expansion, Win32 Specific -Extensions, Running Perl Scripts, Miscellaneous Things - -=back - -=item BUGS AND CAVEATS - -=item AUTHORS - -Gary Ng E71564.1743@CompuServe.COME, Gurusamy Sarathy -Egsar@activestate.comE, Nick Ing-Simmons -Enick@ing-simmons.netE - -=item SEE ALSO - -=item HISTORY - -=back - =head1 PRAGMA DOCUMENTATION =head2 attrs - set/get attributes of a subroutine (deprecated) @@ -8831,39 +8745,41 @@ C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, -C, C, C, -C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, C, C, +C, C, C, C, +C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, +C, C, C, +C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, @@ -8895,14 +8811,14 @@ C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, -C, C, C, C, C, -C, C +C, C, C, C, +C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, +C, C, C, C, C, +C, C, C =item e @@ -8928,28 +8844,28 @@ C, C, C, C C, C, C, C, C, C, C, C, C, C, C, C, -C, C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, C, -C, C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, -C, C, C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, C, -C, C, C, -C, C, C, C, C, -C +C, C, C, C, C, C, +C, C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, +C, C, C, C, C, C, +C, C, C, C, +C, C, C, +C, C, C, C, C, +C, C, C, +C, C, C, C, +C, C, C, +C, C, C, C, +C, C, C, C =item k @@ -11201,7 +11117,7 @@ B<$_>, B<$status>, B and B, B =item Summary of Option Specifications -!, +, s, i, f, : I [ I ] +!, +, s, i, o, f, : I [ I ] =back @@ -12514,27 +12430,10 @@ ffround ( +$scale ), ffround ( -$scale ), ffround ( 0 ), fround ( +$scale =item EXAMPLES - use Math::BigFloat qw(bstr bint); # not ready yet - $x = bstr("1234") # string "1234" - $x = "$x"; # same as bstr() - $x = bneg("1234") # BigFloat "-1234" - $x = Math::BigFloat->bneg("1234"); # BigFloat "1234" - $x = Math::BigFloat->babs("-12345"); # BigFloat "12345" - $x = Math::BigFloat->bnorm("-0 00"); # BigFloat "0" - $x = bint(1) + bint(2); # BigFloat "3" - $x = bint(1) + "2"; # ditto (auto-BigFloatify of "2") - $x = bint(1); # BigFloat "1" - $x = $x + 5 / 2; # BigFloat "3" - $x = $x ** 3; # BigFloat "27" - $x *= 2; # BigFloat "54" - $x = new Math::BigFloat; # BigFloat "0" - $x--; # BigFloat "-1" =item Autocreating constants -=item PERFORMANCE - =item BUGS =item CAVEAT @@ -12580,30 +12479,17 @@ Remarks =over 4 +=item MATH LIBRARY + +=item SIGN + =item mantissa(), exponent() and parts() =back =item EXAMPLES - use Math::BigInt qw(bstr bint); - $x = bstr("1234") # string "1234" - $x = "$x"; # same as bstr() - $x = bneg("1234") # Bigint "-1234" - $x = Math::BigInt->bneg("1234"); # Bigint "-1234" - $x = Math::BigInt->babs("-12345"); # Bigint "12345" - $x = Math::BigInt->bnorm("-0 00"); # BigInt "0" - $x = bint(1) + bint(2); # BigInt "3" - $x = bint(1) + "2"; # ditto (auto-BigIntify of "2") - $x = bint(1); # BigInt "1" - $x = $x + 5 / 2; # BigInt "3" - $x = $x ** 3; # BigInt "27" - $x *= 2; # BigInt "54" - $x = new Math::BigInt; # BigInt "0" - $x--; # BigInt "-1" - $x = Math::BigInt->badd(4,5) # BigInt "9" - $x = Math::BigInt::badd(4,5) # BigInt "9" - print $x->bsstr(); # 9e+0 + use Math::BigInt qw(bstr); =item Autocreating constants @@ -12611,13 +12497,13 @@ Remarks =over 4 -=item Replacing the math library +=item Alternative math libraries =back =item BUGS -:constant and eval() +Out of Memory!, Fails to load Calc on Perl prior 5.6.0 =item CAVEATS @@ -12642,6 +12528,8 @@ Overloading -$x, Mixing different object types, bsqrt() =item EXPORT +=item WRAP YOUR OWN + =item LICENSE This program is free software; you may redistribute it and/or modify it diff --git a/uconfig.h b/uconfig.h index 4dcddc8..3e31582 100644 --- a/uconfig.h +++ b/uconfig.h @@ -1206,6 +1206,24 @@ /*#define CASTNEGFLOAT / **/ #define CASTFLAGS 0 /**/ +/* HAS_CLASS: + * This symbol, if defined, indicates that the class routine is + * available to classify doubles. Available for example in AIX. + * The returned values are defined in and are: + * + * FP_PLUS_NORM Positive normalized, nonzero + * FP_MINUS_NORM Negative normalized, nonzero + * FP_PLUS_DENORM Positive denormalized, nonzero + * FP_MINUS_DENORM Negative denormalized, nonzero + * FP_PLUS_ZERO +0.0 + * FP_MINUS_ZERO -0.0 + * FP_PLUS_INF +INF + * FP_MINUS_INF -INF + * FP_NANS Signaling Not a Number (NaNS) + * FP_NANQ Quiet Not a Number (NaNQ) + */ +/*#define HAS_CLASS / **/ + /* VOID_CLOSEDIR: * This symbol, if defined, indicates that the closedir() routine * does not return a value. @@ -1300,12 +1318,93 @@ */ /*#define HAS_FD_SET / **/ +/* HAS_FINITE: + * This symbol, if defined, indicates that the finite routine is + * available to check whether a double is finite (non-infinity non-NaN). + */ +/*#define HAS_FINITE / **/ + +/* HAS_FINITEL: + * This symbol, if defined, indicates that the finitel routine is + * available to check whether a long double is finite + * (non-infinity non-NaN). + */ +/*#define HAS_FINITEL / **/ + /* FLEXFILENAMES: * This symbol, if defined, indicates that the system supports filenames * longer than 14 characters. */ /*#define FLEXFILENAMES / **/ +/* HAS_FP_CLASS: + * This symbol, if defined, indicates that the fp_class routine is + * available to classify doubles. Available for example in Digital UNIX. + * The returned values are defined in and are: + * + * FP_SNAN Signaling NaN (Not-a-Number) + * FP_QNAN Quiet NaN (Not-a-Number) + * FP_POS_INF +infinity + * FP_NEG_INF -infinity + * FP_POS_NORM Positive normalized + * FP_NEG_NORM Negative normalized + * FP_POS_DENORM Positive denormalized + * FP_NEG_DENORM Negative denormalized + * FP_POS_ZERO +0.0 (positive zero) + * FP_NEG_ZERO -0.0 (negative zero) + */ +/*#define HAS_FP_CLASS / **/ + +/* HAS_FPCLASS: + * This symbol, if defined, indicates that the fpclass routine is + * available to classify doubles. Available for example in Solaris/SVR4. + * The returned values are defined in and are: + * + * FP_SNAN signaling NaN + * FP_QNAN quiet NaN + * FP_NINF negative infinity + * FP_PINF positive infinity + * FP_NDENORM negative denormalized non-zero + * FP_PDENORM positive denormalized non-zero + * FP_NZERO negative zero + * FP_PZERO positive zero + * FP_NNORM negative normalized non-zero + * FP_PNORM positive normalized non-zero + */ +/*#define HAS_FPCLASS / **/ + +/* HAS_FPCLASSIFY: + * This symbol, if defined, indicates that the fpclassify routine is + * available to classify doubles. Available for example in HP-UX. + * The returned values are defined in and are + * + * FP_NORMAL Normalized + * FP_ZERO Zero + * FP_INFINITE Infinity + * FP_SUBNORMAL Denormalized + * FP_NAN NaN + * + */ +/*#define HAS_FPCLASSIFY / **/ + +/* HAS_FPCLASSL: + * This symbol, if defined, indicates that the fpclassl routine is + * available to classify long doubles. Available for example in IRIX. + * The returned values are defined in and are: + * + * FP_SNAN signaling NaN + * FP_QNAN quiet NaN + * FP_NINF negative infinity + * FP_PINF positive infinity + * FP_NDENORM negative denormalized non-zero + * FP_PDENORM positive denormalized non-zero + * FP_NZERO negative zero + * FP_PZERO positive zero + * FP_NNORM negative normalized non-zero + * FP_PNORM positive normalized non-zero + */ +/*#define HAS_FPCLASSL / **/ + /* HAS_FPOS64_T: * This symbol will be defined if the C compiler supports fpos64_t. */ @@ -1634,6 +1733,18 @@ */ /*#define HAS_ISASCII / **/ +/* HAS_ISFINITE: + * This symbol, if defined, indicates that the isfinite routine is + * available to check whether a double is finite (non-infinity non-NaN). + */ +/*#define HAS_ISFINITE / **/ + +/* HAS_ISINF: + * This symbol, if defined, indicates that the isinf routine is + * available to check whether a double is an infinity. + */ +/*#define HAS_ISINF / **/ + /* HAS_ISNAN: * This symbol, if defined, indicates that the isnan routine is * available to check whether a double is a NaN. @@ -2258,6 +2369,13 @@ /*#define USE_SEMCTL_SEMUN / **/ /*#define USE_SEMCTL_SEMID_DS / **/ +/* HAS_UNORDERED: + * This symbol, if defined, indicates that the unordered routine is + * available to check whether two doubles are unordered + * (effectively: whether either of them is NaN) + */ +/*#define HAS_UNORDERED / **/ + /* HAS_USTAT: * This symbol, if defined, indicates that the ustat system call is * available to query file system statistics by dev_t. @@ -2404,6 +2522,12 @@ #define DB_VERSION_MINOR_CFG /**/ #define DB_VERSION_PATCH_CFG /**/ +/* I_FP_CLASS: + * This symbol, if defined, indicates that exists and + * should be included. + */ +/*#define I_FP_CLASS / **/ + /* I_GRP: * This symbol, if defined, indicates to the C program that it should * include . @@ -3447,6 +3571,12 @@ */ /*#define HAS_USLEEP_PROTO / **/ +/* I_FP: + * This symbol, if defined, indicates that exists and + * should be included. + */ +/*#define I_FP / **/ + /* I_LANGINFO: * This symbol, if defined, indicates that exists and * should be included. diff --git a/uconfig.sh b/uconfig.sh index 0604c86..4e30aed 100755 --- a/uconfig.sh +++ b/uconfig.sh @@ -50,6 +50,7 @@ d_charvspr='undef' d_chown='undef' d_chroot='undef' d_chsize='undef' +d_class='undef' d_closedir='undef' d_cmsghdr_s='undef' d_const='undef' @@ -84,11 +85,17 @@ d_fd_macros='undef' d_fd_set='undef' d_fds_bits='undef' d_fgetpos='undef' +d_finite='undef' +d_finitel='undef' d_flexfnam='undef' d_flock='undef' d_flockproto='undef' d_fork='define' +d_fp_class='undef' d_fpathconf='undef' +d_fpclass='undef' +d_fpclassify='undef' +d_fpclassl='undef' d_fpos64_t='undef' d_frexpl='undef' d_fs_data_s='undef' @@ -145,6 +152,8 @@ d_index='undef' d_inetaton='undef' d_int64_t='undef' d_isascii='undef' +d_isfinite='undef' +d_isinf='undef' d_isnan='undef' d_isnanl='undef' d_killpg='undef' @@ -331,6 +340,7 @@ d_ualarm='undef' d_umask='undef' d_uname='undef' d_union_semun='undef' +d_unordered='undef' d_usleep='undef' d_usleepproto='undef' d_ustat='undef' @@ -387,6 +397,8 @@ i_dld='undef' i_dlfcn='undef' i_fcntl='undef' i_float='undef' +i_fp='undef' +i_fp_class='undef' i_gdbm='undef' i_grp='undef' i_iconv='undef' diff --git a/vos/config.alpha.def b/vos/config.alpha.def index 6400dfa..5dd17a9 100644 --- a/vos/config.alpha.def +++ b/vos/config.alpha.def @@ -40,6 +40,7 @@ $d_charvspr='undef' $d_chown='undef' $d_chroot='undef' $d_chsize='undef' +$d_class='undef' $d_cmsghdr_s='undef' $d_const='define' $d_crypt='undef' @@ -69,11 +70,17 @@ $d_fcntl='define' $d_fcntl_can_lock='define' $d_fd_set='undef' $d_fgetpos='define' +$d_finite='undef' +$d_finitel='undef' $d_flexfnam='define' $d_flock='undef' $d_flockproto='undef' $d_fork='undef' +$d_fp_class='undef' $d_fpathconf='define' +$d_fpclass='undef' +$d_fpclassify='undef' +$d_fpclassl='undef' $d_fpos64_t='undef' $d_frexpl='undef' $d_fs_data_s='undef' @@ -128,6 +135,8 @@ $d_index='undef' $d_inetaton='undef' $d_int64_t='undef' $d_isascii='define' +$d_isfinite='undef' +$d_isinf='undef' $d_isnan='undef' $d_isnanl='undef' $d_killpg='undef' @@ -296,6 +305,7 @@ $d_ualarm='undef' $d_umask='define' $d_uname='define' $d_union_semun='undef' +$d_unordered='undef' $d_usleep='undef' $d_usleepproto='undef' $d_ustat='undef' @@ -346,6 +356,8 @@ $i_dirent='define' $i_dlfcn='undef' $i_fcntl='define' $i_float='define' +$i_fp='undef' +$i_fp_class='undef' $i_grp='define' $i_iconv='undef' $i_ieeefp='undef' diff --git a/vos/config.alpha.h b/vos/config.alpha.h index 839556e..1f114f6 100644 --- a/vos/config.alpha.h +++ b/vos/config.alpha.h @@ -1206,6 +1206,24 @@ #define CASTNEGFLOAT /**/ #define CASTFLAGS 0 /**/ +/* HAS_CLASS: + * This symbol, if defined, indicates that the class routine is + * available to classify doubles. Available for example in AIX. + * The returned values are defined in and are: + * + * FP_PLUS_NORM Positive normalized, nonzero + * FP_MINUS_NORM Negative normalized, nonzero + * FP_PLUS_DENORM Positive denormalized, nonzero + * FP_MINUS_DENORM Negative denormalized, nonzero + * FP_PLUS_ZERO +0.0 + * FP_MINUS_ZERO -0.0 + * FP_PLUS_INF +INF + * FP_MINUS_INF -INF + * FP_NANS Signaling Not a Number (NaNS) + * FP_NANQ Quiet Not a Number (NaNQ) + */ +/*#define HAS_CLASS /**/ + /* VOID_CLOSEDIR: * This symbol, if defined, indicates that the closedir() routine * does not return a value. @@ -1300,12 +1318,93 @@ */ /*#define HAS_FD_SET /**/ +/* HAS_FINITE: + * This symbol, if defined, indicates that the finite routine is + * available to check whether a double is finite (non-infinity non-NaN). + */ +/*#define HAS_FINITE /**/ + +/* HAS_FINITEL: + * This symbol, if defined, indicates that the finitel routine is + * available to check whether a long double is finite + * (non-infinity non-NaN). + */ +/*#define HAS_FINITEL /**/ + /* FLEXFILENAMES: * This symbol, if defined, indicates that the system supports filenames * longer than 14 characters. */ #define FLEXFILENAMES /**/ +/* HAS_FP_CLASS: + * This symbol, if defined, indicates that the fp_class routine is + * available to classify doubles. Available for example in Digital UNIX. + * The returned values are defined in and are: + * + * FP_SNAN Signaling NaN (Not-a-Number) + * FP_QNAN Quiet NaN (Not-a-Number) + * FP_POS_INF +infinity + * FP_NEG_INF -infinity + * FP_POS_NORM Positive normalized + * FP_NEG_NORM Negative normalized + * FP_POS_DENORM Positive denormalized + * FP_NEG_DENORM Negative denormalized + * FP_POS_ZERO +0.0 (positive zero) + * FP_NEG_ZERO -0.0 (negative zero) + */ +/*#define HAS_FP_CLASS /**/ + +/* HAS_FPCLASS: + * This symbol, if defined, indicates that the fpclass routine is + * available to classify doubles. Available for example in Solaris/SVR4. + * The returned values are defined in and are: + * + * FP_SNAN signaling NaN + * FP_QNAN quiet NaN + * FP_NINF negative infinity + * FP_PINF positive infinity + * FP_NDENORM negative denormalized non-zero + * FP_PDENORM positive denormalized non-zero + * FP_NZERO negative zero + * FP_PZERO positive zero + * FP_NNORM negative normalized non-zero + * FP_PNORM positive normalized non-zero + */ +/*#define HAS_FPCLASS /**/ + +/* HAS_FPCLASSIFY: + * This symbol, if defined, indicates that the fpclassify routine is + * available to classify doubles. Available for example in HP-UX. + * The returned values are defined in and are + * + * FP_NORMAL Normalized + * FP_ZERO Zero + * FP_INFINITE Infinity + * FP_SUBNORMAL Denormalized + * FP_NAN NaN + * + */ +/*#define HAS_FPCLASSIFY /**/ + +/* HAS_FPCLASSL: + * This symbol, if defined, indicates that the fpclassl routine is + * available to classify long doubles. Available for example in IRIX. + * The returned values are defined in and are: + * + * FP_SNAN signaling NaN + * FP_QNAN quiet NaN + * FP_NINF negative infinity + * FP_PINF positive infinity + * FP_NDENORM negative denormalized non-zero + * FP_PDENORM positive denormalized non-zero + * FP_NZERO negative zero + * FP_PZERO positive zero + * FP_NNORM negative normalized non-zero + * FP_PNORM positive normalized non-zero + */ +/*#define HAS_FPCLASSL /**/ + /* HAS_FPOS64_T: * This symbol will be defined if the C compiler supports fpos64_t. */ @@ -1634,6 +1733,18 @@ */ #define HAS_ISASCII /**/ +/* HAS_ISFINITE: + * This symbol, if defined, indicates that the isfinite routine is + * available to check whether a double is finite (non-infinity non-NaN). + */ +/*#define HAS_ISFINITE /**/ + +/* HAS_ISINF: + * This symbol, if defined, indicates that the isinf routine is + * available to check whether a double is an infinity. + */ +/*#define HAS_ISINF /**/ + /* HAS_ISNAN: * This symbol, if defined, indicates that the isnan routine is * available to check whether a double is a NaN. @@ -2258,6 +2369,13 @@ /*#define USE_SEMCTL_SEMUN /**/ /*#define USE_SEMCTL_SEMID_DS /**/ +/* HAS_UNORDERED: + * This symbol, if defined, indicates that the unordered routine is + * available to check whether two doubles are unordered + * (effectively: whether either of them is NaN) + */ +/*#define HAS_UNORDERED /**/ + /* HAS_USTAT: * This symbol, if defined, indicates that the ustat system call is * available to query file system statistics by dev_t. @@ -2404,6 +2522,12 @@ #define DB_VERSION_MINOR_CFG undef /**/ #define DB_VERSION_PATCH_CFG undef /**/ +/* I_FP_CLASS: + * This symbol, if defined, indicates that exists and + * should be included. + */ +/*#define I_FP_CLASS /**/ + /* I_GRP: * This symbol, if defined, indicates to the C program that it should * include . @@ -3447,6 +3571,12 @@ */ /*#define HAS_USLEEP_PROTO /**/ +/* I_FP: + * This symbol, if defined, indicates that exists and + * should be included. + */ +/*#define I_FP /**/ + /* I_LANGINFO: * This symbol, if defined, indicates that exists and * should be included. diff --git a/vos/config.ga.def b/vos/config.ga.def index 6144bac..ab92d19 100644 --- a/vos/config.ga.def +++ b/vos/config.ga.def @@ -40,6 +40,7 @@ $d_charvspr='undef' $d_chown='define' $d_chroot='undef' $d_chsize='undef' +$d_class='undef' $d_cmsghdr_s='undef' $d_const='define' $d_crypt='undef' @@ -69,11 +70,17 @@ $d_fcntl='define' $d_fcntl_can_lock='define' $d_fd_set='undef' $d_fgetpos='define' +$d_finite='undef' +$d_finitel='undef' $d_flexfnam='define' $d_flock='undef' $d_flockproto='undef' $d_fork='define' +$d_fp_class='undef' $d_fpathconf='define' +$d_fpclass='undef' +$d_fpclassify='undef' +$d_fpclassl='undef' $d_fpos64_t='undef' $d_frexpl='undef' $d_fs_data_s='undef' @@ -128,6 +135,8 @@ $d_index='undef' $d_inetaton='undef' $d_int64_t='undef' $d_isascii='define' +$d_isfinite='undef' +$d_isinf='undef' $d_isnan='undef' $d_isnanl='undef' $d_killpg='undef' @@ -296,6 +305,7 @@ $d_ualarm='undef' $d_umask='define' $d_uname='define' $d_union_semun='undef' +$d_unordered='undef' $d_usleep='undef' $d_usleepproto='undef' $d_ustat='undef' @@ -346,6 +356,8 @@ $i_dirent='define' $i_dlfcn='undef' $i_fcntl='define' $i_float='define' +$i_fp='undef' +$i_fp_class='undef' $i_grp='define' $i_iconv='undef' $i_ieeefp='undef' diff --git a/vos/config.ga.h b/vos/config.ga.h index 4db7499..d4ab292 100644 --- a/vos/config.ga.h +++ b/vos/config.ga.h @@ -1206,6 +1206,24 @@ #define CASTNEGFLOAT /**/ #define CASTFLAGS 0 /**/ +/* HAS_CLASS: + * This symbol, if defined, indicates that the class routine is + * available to classify doubles. Available for example in AIX. + * The returned values are defined in and are: + * + * FP_PLUS_NORM Positive normalized, nonzero + * FP_MINUS_NORM Negative normalized, nonzero + * FP_PLUS_DENORM Positive denormalized, nonzero + * FP_MINUS_DENORM Negative denormalized, nonzero + * FP_PLUS_ZERO +0.0 + * FP_MINUS_ZERO -0.0 + * FP_PLUS_INF +INF + * FP_MINUS_INF -INF + * FP_NANS Signaling Not a Number (NaNS) + * FP_NANQ Quiet Not a Number (NaNQ) + */ +/*#define HAS_CLASS /**/ + /* VOID_CLOSEDIR: * This symbol, if defined, indicates that the closedir() routine * does not return a value. @@ -1300,12 +1318,93 @@ */ /*#define HAS_FD_SET /**/ +/* HAS_FINITE: + * This symbol, if defined, indicates that the finite routine is + * available to check whether a double is finite (non-infinity non-NaN). + */ +/*#define HAS_FINITE /**/ + +/* HAS_FINITEL: + * This symbol, if defined, indicates that the finitel routine is + * available to check whether a long double is finite + * (non-infinity non-NaN). + */ +/*#define HAS_FINITEL /**/ + /* FLEXFILENAMES: * This symbol, if defined, indicates that the system supports filenames * longer than 14 characters. */ #define FLEXFILENAMES /**/ +/* HAS_FP_CLASS: + * This symbol, if defined, indicates that the fp_class routine is + * available to classify doubles. Available for example in Digital UNIX. + * The returned values are defined in and are: + * + * FP_SNAN Signaling NaN (Not-a-Number) + * FP_QNAN Quiet NaN (Not-a-Number) + * FP_POS_INF +infinity + * FP_NEG_INF -infinity + * FP_POS_NORM Positive normalized + * FP_NEG_NORM Negative normalized + * FP_POS_DENORM Positive denormalized + * FP_NEG_DENORM Negative denormalized + * FP_POS_ZERO +0.0 (positive zero) + * FP_NEG_ZERO -0.0 (negative zero) + */ +/*#define HAS_FP_CLASS /**/ + +/* HAS_FPCLASS: + * This symbol, if defined, indicates that the fpclass routine is + * available to classify doubles. Available for example in Solaris/SVR4. + * The returned values are defined in and are: + * + * FP_SNAN signaling NaN + * FP_QNAN quiet NaN + * FP_NINF negative infinity + * FP_PINF positive infinity + * FP_NDENORM negative denormalized non-zero + * FP_PDENORM positive denormalized non-zero + * FP_NZERO negative zero + * FP_PZERO positive zero + * FP_NNORM negative normalized non-zero + * FP_PNORM positive normalized non-zero + */ +/*#define HAS_FPCLASS /**/ + +/* HAS_FPCLASSIFY: + * This symbol, if defined, indicates that the fpclassify routine is + * available to classify doubles. Available for example in HP-UX. + * The returned values are defined in and are + * + * FP_NORMAL Normalized + * FP_ZERO Zero + * FP_INFINITE Infinity + * FP_SUBNORMAL Denormalized + * FP_NAN NaN + * + */ +/*#define HAS_FPCLASSIFY /**/ + +/* HAS_FPCLASSL: + * This symbol, if defined, indicates that the fpclassl routine is + * available to classify long doubles. Available for example in IRIX. + * The returned values are defined in and are: + * + * FP_SNAN signaling NaN + * FP_QNAN quiet NaN + * FP_NINF negative infinity + * FP_PINF positive infinity + * FP_NDENORM negative denormalized non-zero + * FP_PDENORM positive denormalized non-zero + * FP_NZERO negative zero + * FP_PZERO positive zero + * FP_NNORM negative normalized non-zero + * FP_PNORM positive normalized non-zero + */ +/*#define HAS_FPCLASSL /**/ + /* HAS_FPOS64_T: * This symbol will be defined if the C compiler supports fpos64_t. */ @@ -1634,6 +1733,18 @@ */ #define HAS_ISASCII /**/ +/* HAS_ISFINITE: + * This symbol, if defined, indicates that the isfinite routine is + * available to check whether a double is finite (non-infinity non-NaN). + */ +/*#define HAS_ISFINITE /**/ + +/* HAS_ISINF: + * This symbol, if defined, indicates that the isinf routine is + * available to check whether a double is an infinity. + */ +/*#define HAS_ISINF /**/ + /* HAS_ISNAN: * This symbol, if defined, indicates that the isnan routine is * available to check whether a double is a NaN. @@ -2258,6 +2369,13 @@ /*#define USE_SEMCTL_SEMUN /**/ /*#define USE_SEMCTL_SEMID_DS /**/ +/* HAS_UNORDERED: + * This symbol, if defined, indicates that the unordered routine is + * available to check whether two doubles are unordered + * (effectively: whether either of them is NaN) + */ +/*#define HAS_UNORDERED /**/ + /* HAS_USTAT: * This symbol, if defined, indicates that the ustat system call is * available to query file system statistics by dev_t. @@ -2404,6 +2522,12 @@ #define DB_VERSION_MINOR_CFG undef /**/ #define DB_VERSION_PATCH_CFG undef /**/ +/* I_FP_CLASS: + * This symbol, if defined, indicates that exists and + * should be included. + */ +/*#define I_FP_CLASS /**/ + /* I_GRP: * This symbol, if defined, indicates to the C program that it should * include . @@ -3447,6 +3571,12 @@ */ /*#define HAS_USLEEP_PROTO /**/ +/* I_FP: + * This symbol, if defined, indicates that exists and + * should be included. + */ +/*#define I_FP /**/ + /* I_LANGINFO: * This symbol, if defined, indicates that exists and * should be included. diff --git a/win32/config.bc b/win32/config.bc index 7d6cebe..fd795a0 100644 --- a/win32/config.bc +++ b/win32/config.bc @@ -104,6 +104,7 @@ d_charvspr='undef' d_chown='undef' d_chroot='undef' d_chsize='define' +d_class='undef' d_closedir='define' d_cmsghdr_s='undef' d_const='define' @@ -138,11 +139,17 @@ d_fd_macros='define' d_fd_set='define' d_fds_bits='define' d_fgetpos='define' +d_finite='undef' +d_finitel='undef' d_flexfnam='define' d_flock='define' d_flockproto='undef' d_fork='undef' +d_fp_class='undef' d_fpathconf='undef' +d_fpclass='undef' +d_fpclassify='undef' +d_fpclassl='undef' d_fpos64_t='undef' d_frexpl='undef' d_fs_data_s='undef' @@ -198,6 +205,8 @@ d_index='undef' d_inetaton='undef' d_int64_t='undef' d_isascii='define' +d_isfinite='undef' +d_isinf='undef' d_isnan='define' d_isnanl='undef' d_killpg='undef' @@ -383,6 +392,7 @@ d_ualarm='undef' d_umask='define' d_uname='define' d_union_semun='define' +d_unordered='undef' d_usleep='undef' d_usleepproto='undef' d_ustat='undef' @@ -462,6 +472,8 @@ i_dld='undef' i_dlfcn='define' i_fcntl='define' i_float='define' +i_fp='undef' +i_fp_class='undef' i_gdbm='undef' i_grp='undef' i_iconv='undef' diff --git a/win32/config.gc b/win32/config.gc index 9b03d12..1cd02b2 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -104,6 +104,7 @@ d_charvspr='undef' d_chown='undef' d_chroot='undef' d_chsize='define' +d_class='undef' d_closedir='define' d_cmsghdr_s='undef' d_const='define' @@ -138,11 +139,17 @@ d_fd_macros='define' d_fd_set='define' d_fds_bits='define' d_fgetpos='define' +d_finite='undef' +d_finitel='undef' d_flexfnam='define' d_flock='define' d_flockproto='undef' d_fork='undef' +d_fp_class='undef' d_fpathconf='undef' +d_fpclass='undef' +d_fpclassify='undef' +d_fpclassl='undef' d_fpos64_t='undef' d_frexpl='undef' d_fs_data_s='undef' @@ -198,6 +205,8 @@ d_index='undef' d_inetaton='undef' d_int64_t='undef' d_isascii='define' +d_isfinite='undef' +d_isinf='undef' d_isnan='define' d_isnanl='undef' d_killpg='undef' @@ -383,6 +392,7 @@ d_ualarm='undef' d_umask='define' d_uname='define' d_union_semun='define' +d_unordered='undef' d_usleep='undef' d_usleepproto='undef' d_ustat='undef' @@ -462,6 +472,8 @@ i_dld='undef' i_dlfcn='define' i_fcntl='define' i_float='define' +i_fp='undef' +i_fp_class='undef' i_gdbm='undef' i_grp='undef' i_iconv='undef' diff --git a/win32/config.vc b/win32/config.vc index 9909393..d946051 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -104,6 +104,7 @@ d_charvspr='undef' d_chown='undef' d_chroot='undef' d_chsize='define' +d_class='undef' d_closedir='define' d_cmsghdr_s='undef' d_const='define' @@ -138,11 +139,17 @@ d_fd_macros='define' d_fd_set='define' d_fds_bits='define' d_fgetpos='define' +d_finite='undef' +d_finitel='undef' d_flexfnam='define' d_flock='define' d_flockproto='undef' d_fork='undef' +d_fp_class='undef' d_fpathconf='undef' +d_fpclass='undef' +d_fpclassify='undef' +d_fpclassl='undef' d_fpos64_t='undef' d_frexpl='undef' d_fs_data_s='undef' @@ -198,6 +205,8 @@ d_index='undef' d_inetaton='undef' d_int64_t='undef' d_isascii='define' +d_isfinite='undef' +d_isinf='undef' d_isnan='define' d_isnanl='undef' d_killpg='undef' @@ -383,6 +392,7 @@ d_ualarm='undef' d_umask='define' d_uname='define' d_union_semun='define' +d_unordered='undef' d_usleep='undef' d_usleepproto='undef' d_ustat='undef' @@ -462,6 +472,8 @@ i_dld='undef' i_dlfcn='define' i_fcntl='define' i_float='define' +i_fp='undef' +i_fp_class='undef' i_gdbm='undef' i_grp='undef' i_iconv='undef'