I am going crazy, please help!

I have the following:

a-b=X

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!

nik :D

Re: I am going crazy, please help!

Maybe something like that:

F=(a-b)/sqrt((a-b)^2)

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?