-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
29 lines (25 loc) · 877 Bytes
/
Copy pathmain.cpp
File metadata and controls
29 lines (25 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import sedenion;
#include <iostream>
int main() {
using S = Sedenion<double>;
constexpr double EPS = 1e-7;
for (int a = 1; a < 8; ++a) {
for (int b = 8; b < 16; ++b) {
for (int c = a+1; c < 8; ++c) {
for (int d = 8; d < 16; ++d) {
S x, y;
x.set(a, 1); x.set(b, 1);
y.set(c, 1); y.set(d, 1);
auto product = *(x * y);
bool is_zero = true;
for (int i = 0; i < 16; ++i)
if (std::abs(product.get(i)) >= EPS)
is_zero = false;
if (is_zero)
std::cout << "FOUND: (e" << a << " + e" << b
<< ") * (e" << c << " + e" << d << ") == 0\n";
}
}
}
}
}