[Gecode] Some small quirks in abs and power

Gabor Szokoli szokoli at ps.uni-sb.de
Thu Nov 20 12:09:43 CET 2003


Christian Schulte wrote:

>Hej Gabor,
>
>there is a small quirk in abs and some bigger in power:
>
>	abs: the post function for AbsBndEx is flawed. Just check what you
>did!
>
>  
>
I can see it does not do the logic yet, it is  a mere placeholder. 
Should have added the if... or at least a  //TODO tag.
I can also see you replaced inline with forceinline. I assume this is to 
avoid the possiblity of a linking error in the case a compiler would 
decide not to perform the non-forced inlining?
Am I still missing something?
What else did I do wrong here?

>	power: power is also defined on NEGATIVE numbers! Just to remind:
>numbers can be also negative here!
>  
>
Power is my little hello world propagator, it currently implements the 
constraint a^b=c and {a,b,c}>=0. Badly.
I'll add the sign-aware logic.


Gabor



More information about the gecode-users mailing list