check_isinfp ("isinf (1/0) == +1", Inf_var); check_isinfn ("isinf (-1/0) == -1", -Inf_var);
check_isinfp ("isinf (inf) == +1", Inf_var); check_isinfn ("isinf (-inf) == -1", -Inf_var);
basic_tests (void){  /* variables are declared volatile to forbid some compiler     optimizations */  volatile MATHTYPE Inf_var, NaN_var, zero_var, one_var;  MATHTYPE x1, x2;  zero_var = 0.0;  one_var = 1.0;  NaN_var = nan_value;  Inf_var = one_var / zero_var;  this_does_nothing ();  check_isinfp ("isinf (1/0) == +1", Inf_var);  check_isinfn ("isinf (-1/0) == -1", -Inf_var);  check_bool ("!isinf (1)", !(FUNC(isinf) (one_var)));  check_bool ("!isinf (0/0)", !(FUNC(isinf) (NaN_var)));  check_isnan ("isnan (0/0)", NaN_var);  check_isnan ("isnan (-(0/0))", -NaN_var);  check_bool ("!isnan (1)", !(FUNC(isnan) (one_var)));  check_bool ("!isnan (0/0)", !(FUNC(isnan) (Inf_var)));  check_bool ("inf == inf", Inf_var == Inf_var);  check_bool ("-inf == -inf", -Inf_var == -Inf_var);  check_bool ("inf != -inf", Inf_var != -Inf_var);  check_bool ("NaN != NaN", NaN_var != NaN_var);  /*     the same tests but this time with NAN from <nan.h>     NAN is a double const   */  check_bool ("isnan (NAN)", isnan (NAN));  check_bool ("isnan (-NAN)", isnan (-NAN));  check_bool ("!isinf (NAN)", !(isinf (NAN)));  check_bool ("!isinf (-NAN)", !(isinf (-NAN)));  check_bool ("NAN != NAN", NAN != NAN);  /*     And again with the value returned by the `nan' function.   */  check_bool ("isnan (NAN)", isnan (FUNC(nan) ("")));  check_bool ("isnan (-NAN)", isnan (-FUNC(nan) ("")));  check_bool ("!isinf (NAN)", !(isinf (FUNC(nan) (""))));  check_bool ("!isinf (-NAN)", !(isinf (-FUNC(nan) (""))));  check_bool ("NAN != NAN", FUNC(nan) ("") != FUNC(nan) (""));  /* test if EPSILON is ok */  x1 = MATHCONST (1.0);  x2 = x1 + CHOOSE (LDBL_EPSILON, DBL_EPSILON, FLT_EPSILON);  check_bool ("1 != 1+EPSILON", x1 != x2);  x1 = MATHCONST (1.0);  x2 = x1 - CHOOSE (LDBL_EPSILON, DBL_EPSILON, FLT_EPSILON);  check_bool ("1 != 1-EPSILON", x1 != x2);  /* test if HUGE_VALx is ok */  x1 = CHOOSE (HUGE_VALL, HUGE_VAL, HUGE_VALF);  check_bool ("isinf (HUGE_VALx) == +1", ISINF (x1) == +1);  x1 = -CHOOSE (HUGE_VALL, HUGE_VAL, HUGE_VALF);  check_bool ("isinf (-HUGE_VALx) == -1", ISINF (x1) == -1);}