I wonder if it is possible to build a sign(x) function which will return either 1 for positive values of x, or -1 for negative ones - using only the 4 basic arithmetic operations (+ - / *)
Clearly it is easy to accomplish this if using sqrt() would be allowed as well ( sign(x) = x/sqrt(x²) )
- But is it possible using only basic arithmetics as well?