$\begingroup$

Let $a$ be a real number . The positive part of $a$, denoted by $a^+$ is given by expression $$a^+ = \text{if } a\geq 0 \text{ then $a$ else } 0$$ The negative part of $a$, denoted by $a^-$ is given by expression $$a^- = \text{if } a\geq 0 \text{ then $0$ else } -a$$ Both $a^+$ and $a^-$ are non negative and the following relationship hold $$ a = a^+ - a^-$$ Above is the text from my compiler optimization book and I cannot understand the relationship explained. How can $a$ be a real number and have positive and negative parts?

Answers