Skip to content

Commit 14c9bf4

Browse files
authored
Merge pull request sympy#17868 from czgdp1807/fuzzy-or
Updated fuzzy_or
2 parents c4153c2 + 3487589 commit 14c9bf4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

sympy/core/logic.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,14 @@ def fuzzy_or(args):
186186
None
187187
188188
"""
189-
return fuzzy_not(fuzzy_and(fuzzy_not(i) for i in args))
189+
rv = False
190+
for ai in args:
191+
ai = fuzzy_bool(ai)
192+
if ai is True:
193+
return True
194+
if rv is False: # this will stop updating if a None is ever trapped
195+
rv = ai
196+
return rv
190197

191198

192199
def fuzzy_xor(args):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy