+int
+dis_isinf (double num)
+{
+#ifdef HAVE_ISINF
+ return isinf (num);
+#elif defined(HAVE_IEEEFP_H)
+ fpclass_t klass;
+
+ klass = fpclass (num);
+ if (klass == FP_NINF)
+ return -1;
+
+ if (klass == FP_PINF)
+ return 1;
+
+ return 0;
+#elif defined(HAVE__FINITE)
+ return _finite (num) ? 0 : 1;
+#else
+#error "Don't know how to implement isinf for this platform."
+#endif
+}
+
+int
+dis_isnan (double num)
+{
+#ifdef __MINGW32_VERSION
+return _isnan (num);
+#else
+return isnan (num);
+#endif
+}
+