## 5.346. sign_of

Origin

Arithmetic.

Constraint

$\mathrm{𝚜𝚒𝚐𝚗}_\mathrm{𝚘𝚏}\left(𝚂,𝚇\right)$

Usual name

$\mathrm{𝚜𝚒𝚐𝚗}$

Arguments
 $𝚂$ $\mathrm{𝚍𝚟𝚊𝚛}$ $𝚇$ $\mathrm{𝚍𝚟𝚊𝚛}$
Restrictions
 $𝚂\ge -1$ $𝚂\le 1$
Purpose

According to the value of the first variable $𝚂$, restrict the sign of the second variable $𝚇$:

• When $𝚂=-1$, $𝚇$ should be negative (i.e., $𝚇<0$).

• When $𝚂=0$, $𝚇$ is also equal to 0.

• When $𝚂=+1$, $𝚇$ should be positive (i.e., $𝚇>0$).

Example
 $\left(-1,-8\right)$ $\left(0,0\right)$ $\left(1,8\right)$
• The first $\mathrm{𝚜𝚒𝚐𝚗}_\mathrm{𝚘𝚏}$ constraint holds since $𝚂=-1$ and $𝚇=-8$ is negative.

• The second $\mathrm{𝚜𝚒𝚐𝚗}_\mathrm{𝚘𝚏}$ constraint holds since $𝚂=0$ and $𝚇=0$ is neither negative, neither positive.

• The second $\mathrm{𝚜𝚒𝚐𝚗}_\mathrm{𝚘𝚏}$ constraint holds since $𝚂=+1$ and $𝚇=8$ is positive.

Typical
 $𝚂\ne 0$ $𝚇\ne 0$
Arg. properties

Functional dependency: $𝚂$ determined by $𝚇$.