Geometric algebra: Difference between revisions
m
→{{header|Julia}}
Line 1,371:
function testcliffordvector()
allorthonormal = true
for i in 0:4, j in 0:4
i < j &&
i == j &&
end
println("e(i) * e(j) are orthonormal for i, j ϵ [0, 4]: ", allorthonormal)
a, b, c = randommultivector(), randommultivector(), randommultivector()
x = randomvector()
Line 1,385 ⟶ 1,388:
@show isreal(x * x)
end
testcliffordvector()
</lang>{{out}}
<pre>
e(i) * e(j) are orthonormal for i, j ϵ [0, 4]: true
(a * b) * c ≈ a * (b * c) = true
a * (b + c) ≈ a * b + a * c = true
|