Re: [eclipse-clp-users] Exponentiation and integers

From: Joachim Schimpf <jschimpf_at_...311...>
Date: Mon, 19 Sep 2011 01:35:56 +0200
Sergey Dymchenko wrote:
> Hi!
> 
> I've found that exponentiation (^) from ic library will not work with
> integer constraints even if both values in a exponentiation expression
> are integers.
> 
> For example, this will not find any possibilities:
> 
> N #> 0,
> B #> 0,
> 10^B #> N,
> 
> you have to write
> 
> N #> 0,
> B #> 0,
> 10^B $> N,
> 
> Is this a bug? Is this documented?

Yes, it's a bug (the constraint gets rewritten with an auxiliary
variable, onto which integrality is incorrectly imposed).

Your alternative formulation has the semantics you intended
(as B and N are already known to be integral at this point).

Cheers,
Joachim
Received on Sun Sep 18 2011 - 23:36:03 CEST

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:29 CEST