-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
logical nand #1098
logical nand #1098
Conversation
REQUIRE(eq(*logical_nand({boolFalse}), *boolTrue)); | ||
|
||
REQUIRE(eq(*logical_nand({boolTrue, boolFalse}), *boolTrue)); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed that extra test.
What does SymPy do for |
@isuruf i have added some tests with the help of sympy. |
Looking at the PR, the class |
I looked at what SymPy does and it immediately returns |
@@ -354,6 +405,12 @@ RCP<const Boolean> logical_and(const set_boolean &s) | |||
return and_or<And>(s, false); | |||
} | |||
|
|||
RCP<const Boolean> logical_nand(const set_boolean &s) | |||
{ | |||
RCP<const Boolean> a = and_or<Nand>(s, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be,
RCP<const Boolean> a = and_or<And>(s, false);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or simply RCP<const Boolean> a = logical_and(s);
@RiteshKB, your system time seems to be wrong. Can you fix it and edit the commit? EDIT: At the time of this post, it is
|
@isuruf what else need to be done? |
Looks good |
No description provided.