This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

"We need FINITE_P" for cross compiles



As more of the cross compiling support goes in, the math subdir gives 
fits: newlib doesn't have any of these (math/mathconf.h):

/* Test whether number is finite.  */
#ifdef isfinite
/* This is an ISO C 9x function.  */
# define FINITE_P(X) isfinite (X)
# define FINITEF_P(X) isfinite (X)
# define FINITEL_P(X) isfinite (X)
#else
# ifdef IsNANorINF
/* This is for Solaris, which does not have special macros for other
   types.  */
#  define FINITE_P(X) (!IsNANorINF (X))
#  define FINITEF_P(X) (!IsNANorINF (X))
#  define FINITEL_P(X) (!IsNANorINF (X))
# else
#  if defined _GLIBCPP_HAVE_ISINF && defined _GLIBCPP_HAVE_ISNAN
#   define FINITE_P(X) ({ double __x = (X); !isinf (__x) && !isnan (__x); })
#  else
#   ifdef _GLIBCPP_HAVE_FINITE
#    define FINITE_P(X) finite (X)
#   else
#    error "We need FINITE_P"
#   endif
#  endif


IT looks like this part of v3's complex support went in to ccos, ccosh, 
cexp a while ago, to work around bugs that are still present in v2. 

Anybody know of any workarounds?  (Gaby please help! You know more about 
numerics than I.) 

Or should I add yet another COMPLEX_IS_REALLY_SCREWEDUP_REALLY_REALLY 
macro and put in the old v-2 code for these cases?

-benjamin



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]