summaryrefslogtreecommitdiff
path: root/vos
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-08-09 13:21:51 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-08-09 13:21:51 +0000
commit758a5d7997f283f8e3786c3e353533cc466d5004 (patch)
tree8ef56dd97bbe416bf6a27f16213d1dcd827d4e7b /vos
parent016501c1bd27cb10e1edd3e59809e490357b700c (diff)
downloadperl-758a5d7997f283f8e3786c3e353533cc466d5004.tar.gz
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
Diffstat (limited to 'vos')
-rw-r--r--vos/config.alpha.def12
-rw-r--r--vos/config.alpha.h130
-rw-r--r--vos/config.ga.def12
-rw-r--r--vos/config.ga.h130
4 files changed, 284 insertions, 0 deletions
diff --git a/vos/config.alpha.def b/vos/config.alpha.def
index 6400dfa530..5dd17a9e60 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 839556e64f..1f114f6e8a 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 <float.h> 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 <math.h> 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 <ieeefp.h> 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 <math.h> 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 <ieeefp.h> 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 <fp_class.h> exists and
+ * should be included.
+ */
+/*#define I_FP_CLASS /**/
+
/* I_GRP:
* This symbol, if defined, indicates to the C program that it should
* include <grp.h>.
@@ -3447,6 +3571,12 @@
*/
/*#define HAS_USLEEP_PROTO /**/
+/* I_FP:
+ * This symbol, if defined, indicates that <fp.h> exists and
+ * should be included.
+ */
+/*#define I_FP /**/
+
/* I_LANGINFO:
* This symbol, if defined, indicates that <langinfo.h> exists and
* should be included.
diff --git a/vos/config.ga.def b/vos/config.ga.def
index 6144bac2c7..ab92d19a59 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 4db74992e9..d4ab292947 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 <float.h> 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 <math.h> 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 <ieeefp.h> 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 <math.h> 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 <ieeefp.h> 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 <fp_class.h> exists and
+ * should be included.
+ */
+/*#define I_FP_CLASS /**/
+
/* I_GRP:
* This symbol, if defined, indicates to the C program that it should
* include <grp.h>.
@@ -3447,6 +3571,12 @@
*/
/*#define HAS_USLEEP_PROTO /**/
+/* I_FP:
+ * This symbol, if defined, indicates that <fp.h> exists and
+ * should be included.
+ */
+/*#define I_FP /**/
+
/* I_LANGINFO:
* This symbol, if defined, indicates that <langinfo.h> exists and
* should be included.