[Gecode] Overflow problem in mult

Guido Tack tack at ps.uni-sb.de
Wed May 19 09:42:12 CEST 2004


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



More information about the gecode-users mailing list