File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 1-
21"""
32Functions that transform a given membership value to a truth value.
43
5- How this can be useful? Beats me. Found it somewhere on the internet,
4+ How this can be useful? Beats me. Found it somewhere on the internet,
65never needed it.
76"""
7+
88from math import sqrt
99
1010
1111def true (m ):
1212 """The membership-value is its own truth-value."""
1313 return m
1414
15+
1516def false (m ):
1617 """The opposite of TRUE."""
1718 return 1 - m
1819
20+
1921def fairly_false (m ):
2022 """Part of a circle in quadrant I."""
21- return sqrt (1 - m ** 2 )
23+ return sqrt (1 - m ** 2 )
24+
2225
2326def fairly_true (m ):
2427 """Part of a circle in quadrant II."""
2528 return sqrt (1 - (1 - m ) ** 2 )
2629
30+
2731def very_false (m ):
2832 """Part of a circle in quadrant III."""
2933 return - sqrt (1 - (1 - m ) ** 2 )
3034
35+
3136def very_true (m ):
3237 """Part of a circle in quadrant IV."""
33- return - sqrt (1 - m ** 2 )
38+ return - sqrt (1 - m ** 2 )
You can’t perform that action at this time.
0 commit comments