FrV
FrV

Reputation: 258

Condition refactoring

I have a condition like:

A AND B OR NOT(A) AND NOT(B)

With some refactoring, I got this:

A AND B OR NOT(A OR B)

I'm searching the most refactored expression for this base.

If you have suggestions or tips, it would be great.

Thanks

Upvotes: 0

Views: 173

Answers (3)

FrV
FrV

Reputation: 258

Thanks @Templar, @Mike and @Foxynh

The answer was just A == B

Upvotes: 2

Foxynh
Foxynh

Reputation: 11

Are you programming that? Your case is a NOT XOR

Upvotes: 1

Templar
Templar

Reputation: 1694

It looks like you want a negated XOR between A and B.

XOR logical operator

Upvotes: 1

Related Questions