-
Notifications
You must be signed in to change notification settings - Fork 34
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
🐛 Fix PiExpression
division and multiplication arithmetic
#549
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #549 +/- ##
=====================================
Coverage 91.0% 91.1%
=====================================
Files 131 131
Lines 13664 13667 +3
Branches 2150 2150
=====================================
+ Hits 12444 12451 +7
+ Misses 1220 1216 -4
|
result.type = ConstEvalValue::Type::ConstBool; | ||
break; | ||
case BinaryExpression::Equal: | ||
result.value = lhs == rhs; |
Check notice
Code scanning / CodeQL
Equality test on floating-point values
result.type = ConstEvalValue::Type::ConstBool; | ||
break; | ||
case BinaryExpression::NotEqual: | ||
result.value = lhs != rhs; |
Check notice
Code scanning / CodeQL
Equality test on floating-point values
Token(const Kind k, const size_t l, const size_t c, std::string s) | ||
: kind(k), line(l), col(c), endLine(l), endCol(c), str(std::move(s)) {} | ||
|
||
static std::string kindToString(const Kind kind) { |
Check warning
Code scanning / CodeQL
Poorly documented large function
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.
LGTM! Many thanks.
Just for my understanding: this should fix all of the test failures in the other feature PR, right? i.e. we can close the linked issue after merging.
PiExpression
division and multiplication arithmetic
## Description This PR adds the last remaining unsupported gates to the ZX library. In the process, it also introduces a new convenience function for integer division of parameter expressions that simplifies some code. In conjunction with #549, this also fixes #486. Fixes #343 ## Checklist: <!--- This checklist serves as a reminder of a couple of things that ensure your pull request will be merged swiftly. --> - [x] The pull request only contains commits that are related to it. - [x] I have added appropriate tests and documentation. - [x] I have made sure that all CI jobs on GitHub pass. - [x] The pull request introduces no new warnings and follows the project's style guidelines. --------- Signed-off-by: burgholzer <burgholzer@me.com> Co-authored-by: Tom Peham <pehamtom@gmx.at>
Description
Fix Arithmetic Issues when dividing or multiplying a
PiExpression
by adouble
.Partially solves #486
Checklist: