[Gecode] Overflow problem in mult
Christian Schulte
schulte at imit.kth.se
Wed May 19 10:56:38 CEST 2004
Thanks for the info. I'll fix it...
Christian
--
Christian Schulte, http://www.imit.kth.se/~schulte/
-----Original Message-----
From: gecode-bounces at ps.uni-sb.de [mailto:gecode-bounces at ps.uni-sb.de] On
Behalf Of Guido Tack
Sent: Wednesday, May 19, 2004 9:42 AM
To: gecode at ps.uni-sb.de
Subject: [Gecode] Overflow problem in mult
Hi!
The mult propagator doesn't seem to be aware of overflows.
E.g. this line
GECODE_CME_PROP(x2 <= Arith::max(x0.min()*x1.min(),x0.max()*x1.max()));
clearly produces bogus results if x0.min==x1.min==0 and
x0.max==x1.max>(INT_MAX/2), because then x0.max*x1.max will overflow and
become < x0.min*x1.min.
--
Guido Tack
Programming Systems Lab
http://www.ps.uni-sb.de/~tack
_______________________________________________
Gecode mailing list
Gecode at ps.uni-sb.de http://www.ps.uni-sb.de/mailman/listinfo/gecode
More information about the gecode-users
mailing list