Compare negative numbers

Hello,

i try a simple compare from negative numbers like this:

if (number1 << number2){
result = 1;
}

if (number1 >> number2){
result = 2;
}

For example:

if (-300 << -200){
result =1;
}

if (-300 >> -200){
result=2;
}

But my result is always result = 2

With positive numbers it works but with negative doesn`t works

I tried to parse the string numbers in float numbers before compare but it doesn`t works too

can somebody give me a simple example for a compare with negative numbers

>> and << are the right and left shift commands
For less than you want <
for less than or equal you want `<=

1 Like

Thank you

now it works after i found a further mistake

For testing i used inject nodes and i send strings as payload instead of numbers :man_facepalming:

after searching for the mistake i build in a second and lost my mind :expressionless:

1 Like