/* Test of rounding towards zero.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007-2008 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
#include <stdlib.h>
-#include "isnanf.h"
+#include "isnanf-nolibm.h"
#define ASSERT(expr) \
do \
if (!(expr)) \
{ \
fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
+ fflush (stderr); \
abort (); \
} \
} \
return
(x >= 0
? (x < 1 ? result == L_(0.0) :
- x - 1 < x ? result <= x && result > x - 1 :
+ x - 1 < x ? result <= x && result >= x - 1 && x - result < 1 :
equal (result, x))
: (x > -1 ? result == L_(0.0) :
- x + 1 > x ? result >= x && result < x + 1 :
+ x + 1 > x ? result >= x && result <= x + 1 && result - x < 1 :
equal (result, x)));
}