Geometric algebra: Difference between revisions
Content added Content deleted
Line 1,372:
function testcliffordvector()
for i in 0:4, j in 0:4
i == j
▲ println("Unexpected nonzero scalar product")
end
a, b, c = randommultivector(), randommultivector(), randommultivector()
x = randomvector()
@show (a * b) * c ≈ a * (b * c)
@show a * (b + c) ≈ a * b + a * c
@show (a + b) * c ≈ a * c + b * c
isreal(x) = x[1] isa Real && all(y -> y == 0, x[2:end])
@show isreal(x * x)
end
|