I am going crazy, please help!
I have the following:
I need one single formula (that uses only addition, substraction, multiplication or division) where if X is a positive number the result will be 1 and if X is a negative number the result will be -1 or 0
Is this possible?
Thanx in advance!
Re: I am going crazy, please help!
Maybe something like that:
This will be 1 if X>0, 0 if X=0, and -1 if X=-1
But I don't know how can it be done without roots and powers.
Is it possible to use absolute value?