Compare two numbers N1 = abc, N2 = def by constructing a function f(a,b,c,d,e,f) that:
- returns 1 if N1 > N2
- returns -1 if N1 < N2
Note: You are not required to return any value for any other relation between N1 and N2. e.g. when they are equal or when their relation is undefined (complex numbers).
other constrains:
- all numbers are integers
- a,b,c,d,e,f may be positive or negative but not zero.
- |a|,|d| < 1000
- |b|,|c|,|e|,|f| < 1010
- running time less than few seconds
Examples:
f(100,100,100,50,100,100) = 1
f(-100,100,100,50,100,100) = 1
f(-100,99,100,50,100,100) = -1
f(100,-100,-100, -1, 3, 100) = 1
f(535, 10^9, 10^8, 443, 10^9, 10^9) = -1
This is code golf. Shortest code wins.