I was wondering if there is a purely mathematical way to, given any number, transform this number into the number one, keeping the original number's signal. Something like:
- f(-4) = -1
- f(5) = 1
- f(-2.5) = -1
- f(pi) = 1
- (. . .)
Is this possible?
I was wondering if there is a purely mathematical way to, given any number, transform this number into the number one, keeping the original number's signal. Something like:
Is this possible?
What you are looking for is the function sign which can be defined like this:
$$\mathrm{sgn}\colon x\mapsto \mathrm{sgn}(x)=\frac {\vert x\vert}x.$$
Its graph is: