Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b65b07e

Browse filesBrowse files
committed
Call std::sort in get_subset_candidates
1 parent 25f2bf8 commit b65b07e
Copy full SHA for b65b07e

2 files changed

+5-2Lines changed: 5 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎symengine/cse.cpp‎

Copy file name to clipboardExpand all lines: symengine/cse.cpp
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ class FuncArgTracker
142142
for (auto f : restrict_to_funcset) {
143143
indices.push_back(f);
144144
}
145+
std::sort(std::begin(indices), std::end(indices));
145146
std::vector<unsigned> intersect_result;
146147
for (const auto &arg : argset) {
147148
std::set_intersection(indices.begin(), indices.end(),
Collapse file

‎symengine/tests/basic/test_cse.cpp‎

Copy file name to clipboardExpand all lines: symengine/tests/basic/test_cse.cpp
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,10 @@ TEST_CASE("CSE: regression test gh-1463", "[cse]")
324324

325325
auto e1 = div(mul(neg(x1), z32), z_x2y);
326326
auto e3 = div(mul(i2, mul(x1, z32)), z_x2y);
327-
auto e4 = add(div(mul(x1w, z32), pow(z_x2y, i2)), div(mul(m3_2, x1wSQRTz), z_x2y));
328-
auto e6 = add(div(mul(im2, mul(x1w, z32)), pow(z_x2y, i2)), mul(i3, div(x1wSQRTz, z_x2y)));
327+
auto e4 = add(div(mul(x1w, z32), pow(z_x2y, i2)),
328+
div(mul(m3_2, x1wSQRTz), z_x2y));
329+
auto e6 = add(div(mul(im2, mul(x1w, z32)), pow(z_x2y, i2)),
330+
mul(i3, div(x1wSQRTz, z_x2y)));
329331
auto e7 = div(mul(x2, mul(x1w, z32)), pow(z_x2y, i2));
330332
auto e9 = div(mul(im2, mul(x2, mul(x1w, z32))), pow(z_x2y, i2));
331333
vec_pair substs;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.