triska/clpz

sign/1 lacking

UWN opened this issue · 2 comments

UWN commented
?- X #= sign(-10).
caught: error(domain_error(clpz_expression,sign(-10)),unknown(sign(-10))-1)

Expected: X = -1.

See also this comment.

UWN commented
?- X #= sign(X).
   clpz:(X#=sign(X)), clpz:(X in-1..1). % clpz:(X#=sign(X)) not needed

Whenever X is -1..1 or less, replace sign(X) by X.

UWN commented

@triska: Is this too difficult to integrate?

?- X #= sign(X).
   clpz:(X#=sign(X)), clpz:(X in-1..1), unexpected.
   clpz:(X in-1..1). % expected
   X in-1..1. % alternate formulation