Geometric algebra: Difference between revisions

m
Line 1,371:
 
function testcliffordvector()
allorthonormal = true
for i in 0:4, j in 0:4
i < j && dotall(iszero, e(i), * e(j)) != 0.0 && throw("Unexpectedallorthonormal nonzero dot= product"false)
i == j && dot!all(iszero, e(i), * e(j)) == 0.0 && throw("Unexpectedallorthonormal zero dot= product"false)
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
4,103

edits