I'm curious whether there's an accepted notation for a function that takes in a number and returns only $\pm 1$ where the sign is the same as the sign of the input. What I'm trying to achieve feels similar to normalizing a vector where the "direction" is only either positive or negative.
$$ \text{sign}(n) = \frac{n}{\left|n\right|} $$
Examples being that $\text{sign}(-4) = -1$ and $\text{sign}(\pi^e) = 1$ .
I ask the question because of a problem where I'm taking a square root of number that has been squared ($\sqrt{a^2}$ where $a$ is not directly known) with the sign of $a$ being indicated by a different but related number $b$. I'm wanting, if one exists, a recognizable way of concisely writing what I've defined as $\sqrt{a^2}=\text{sign}(b) \times a$ without having to define my own notation where some may already exist.