Mathematics : Real Numbers : Conditional Functions

From bitrary
Jump to: navigation, search

Mathematics : Real Numbers


Sign Function

$ sgn(x) = \begin{cases} 1 & \text{if } 0 < x \\ 0 & \text{if } x = 0 \\ -1 & \text{if } x < 0 \\ \end{cases} $


Transformations

is_positive(x)

$ is\_positive(x) = \begin{cases} 1 & \text{if } 0 <= x \\ 0 & \text{if } x < 0 \\ \end{cases} $

$ is\_positive(x) = sgn\left( sgn(x)^2 + 2 \cdot sgn(x) + 1 \right) $


abs(x)

$ abs(x) = x \cdot sgn(x) $