View Single Post
Old 08-11-2018, 03:43 PM   #6
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by please55 View Post
Thank you. Have to admit I don't get the logical process that:
not publisher:vintage or not publisher:faber
isn't actually what I'm trying to specify.
Entering Boolean Algebra zone ...

It doesn't work because the expression you wrote will match any publisher that isn't both vintage and faber, which clearly can never happen. Why does it match?

The OR operator returns TRUE if either the left or the right expression returns TRUE. The only way OR can return FALSE is if both the left and right return FALSE. Consider a book with publisher "vintage". The first expression (not publisher:vintage) returns FALSE, but the second expression (not publisher:faber) returns TRUE. FALSE or TRUE equals TRUE. The same is true for a book with publisher "faber". The first expression returns TRUE because faber is not vintage. The second expression returns FALSE because faber is faber. TRUE or FALSE returns TRUE.

You are looking for books that are neither vintage nor faber. In other words you are looking for books where either (not both) the left or the right expression returns FALSE. This requires the AND operator, which returns TRUE if both the left and right expressions return TRUE, otherwise it returns FALSE.

FWIW 1: this site shows the "truth tables" for boolean operators such as AND and OR. A "truth table" provides the result for all possible inputs.

FWIW 2: Adoby's response makes use of something called De Morgan's laws. These "laws" provide conversions between AND and OR expressions so that the expressions provide the same answer.
chaley is offline   Reply With Quote