Gen logical operator bug

david reason's icon

Something seems bad.

The result should have been 0, but it was 1.


TFL's icon

I get expected result on my side.

Max Patch
Copy patch and select New From Clipboard in Max.

Are you sure you have audio enabled so that the output actually updates?

david reason's icon

Are you sure you have audio enabled so that the output actually updates?

My audio is on.

dequalsrxt's icon

I get the same results as OP if I use constants inside the gen~ patch - outputs a 1 as long as input 1 is non-zero, second input doesn't seem to matter. It works as expected if sending at least one input from the outside.

TFL's icon

My bad, I overlooked. I have the same behavior.

It works fine if using params (declared directly inside of gen~) instead of constants.

dequalsrxt's icon

I suppose there's really no reason to use all constants with logical operators, rather than just send the desired result? I can't think of one anyways.

david reason's icon

I get the same results as OP if I use constants inside the gen~ patch - outputs a 1 as long as input 1 is non-zero, second input doesn't seem to matter. It works as expected if sending at least one input from the outside.

Yes, it shouldn't be like this in theory, but the result is wrong.