[Gecode] Testing arithmetic rounding
Guido Tack
tack at ps.uni-sb.de
Tue Aug 23 09:42:59 CEST 2005
Hi.
I've just removed the rounding test from configure.ac and the Makefiles. I
have replaced it with a check in int/view.icc:
#if (-17 / 7) == -2
#define GECODE_INT_RND_TWDS_ZERO 1
#else
#define GECODE_INT_RND_TWDS_ZERO 0
#endif
This assumes that the preprocessor rounds the same way as the compiler, and I
actually have no idea if it always does. This is however the same test we've
been using in configure.ac so far.
Does anyone know a platform where rounding is not defined towards zero? I'd
just like to test if the preprocessor rounds the same way there.
Cheers,
Guido
--
Guido Tack
Programming Systems Lab, Saarland University, Saarbrücken
http://www.ps.uni-sb.de/~tack
More information about the gecode-users
mailing list