unless |X| means absolute value which I am not sure it will be recognized on a computer.

Absolute value is extremely easy to do on a computer. All it requires is to switch the very first bit of a signed number and then subtract that from the highest possible signed value. Most languages support an abs() function, but it also works if you just do: x = (unsigned int) x or something similar.

But if you're on a computer, the above isn't needed.

if (X < 0) return -1; return 1;

x³ / ((x²)^9)^(1/6)

That will work but I don't know how you would do it in computer language.

Pretty easy actually:

(x*x*x) / pow((pow(x, 18)), 1/6)

If your language doesn't support a power function, you can write it yourself, although doing non integral powers is a bit tricky. But, as I said, you don't need to do all this.

]]>positive = 1

negative = 0

x³ / ((x²)^9)^(1/6)

That will work but I don't know how you would do it in computer language.

x³ / √(x^6)

That might be easier.

]]>nik]]>

How about |X| ÷ X?

That formula will give 1 if X is positive, -1 if X is negative and won't work if X is 0.

Excuse my ignorance, but if i do X ÷ X I get 1 if X is positive, but if X is negative I still get 1, unless |X| means absolute value which I am not sure it will be recognized on a computer.

I appreciate your help

nik

That formula will give 1 if X is positive, -1 if X is negative and won't work if X is 0.

Edit: |X| ≡ abs (X). But you figured that out anyway.

]]>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