#include "test_helpers.h"
#include <float.h>
#include "ulong_extras.h"
#include "double_extras.h"
TEST_FUNCTION_START(d_is_nan, state)
{
double x;
slong iter;
x = D_NAN;
if (!d_is_nan(x))
TEST_FUNCTION_FAIL("0 returned for %g\n", x);
x = D_INF;
if (d_is_nan(x))
TEST_FUNCTION_FAIL("Non-zero returned for %g\n", x);
for (iter = 0; iter < 10000 * flint_test_multiplier(); iter++)
{
x = d_randtest_signed(state, 0, 0);
if (d_is_nan(x))
TEST_FUNCTION_FAIL("Non-zero returned for %g\n", x);
}
TEST_FUNCTION_END(state);
}