[eclipse-clp-users] ic:element/3 for float values

From: Sergii Dymchenko <kit1980_at_gmail.com>
Date: Mon, 8 Jul 2013 11:47:26 -0700
Hi,

I can use ic:element/3 like this:

[eclipse]: X #>= 2, A = [](10, 20, 30), element(X, A, Z).
X = X{[2, 3]}
A = [](10, 20, 30)
Z = Z{[20, 30]}

But if A contains float values, I get "type error in Z".

I've looked at the source code of element/3 and found that it does some
complicated stuff that makes sense only if values are integers.
Any suggestions how to make ic:element/3 work with float values (maybe in
some surrogate form)?

Sergii.
Received on Mon Jul 08 2013 - 18:47:37 CEST

This archive was generated by hypermail 2.2.0 : Tue Jul 09 2013 - 18:13:16 CEST