Created
May 13, 2016 20:05
-
-
Save Fraktality/3232f0a4416461ae46f044cbf57e9222 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local fuzzy = { | |
NOT = function(x) | |
return 1 - x | |
end; | |
AND = function(x, y) | |
return x*y | |
end; | |
OR = function(x, y) | |
return x + y - x*y | |
end; | |
NOR = function(x, y) | |
return (1 - x)*(1 - y) | |
end; | |
XOR = function(x, y) | |
return 1 - (1 + x*(y - 1))*(1 + y*(x - 1)) | |
end; | |
XNOR = function(x, y) | |
return (1 + x*(y - 1))*(1 + y*(x - 1)) | |
end; | |
NAND = function(x, y) | |
return 1 - x*y | |
end; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment