Commit graph

10 commits

Author SHA1 Message Date
Bill Currie
2967b97c18 [qfcc] Flip the 2d PGA layout
The makes 2d PGA and 3d VGA layouts consistent.
2023-09-09 21:19:50 +09:00
Bill Currie
09cdf87f67 [qfcc] Used aligned type sizes for sizeof
And geometric algebra vectors. This does break things a little in GA,
but it does bring qfcc's C closer to standard C in that sizeof respects
the alignment of the type (very important for arrays).
2023-08-29 13:59:12 +09:00
Bill Currie
58a1758363 [qfcc] Implement the regressive product
That went surprisingly well (but it is built up from other ops, so
pretty easy, really).
2023-08-28 20:35:03 +09:00
Bill Currie
e2d812ab6a [qfcc] Implement multi-vector dual
It's implemented as the Hodge dual, which is probably reasonable until
people complain. Both ⋆ and ! are supported, though the former is a
little hard to see in Consola.
2023-08-28 20:35:03 +09:00
Bill Currie
1329a1c43a [qfcc] Implement multi-vector negation
That was surprisingly harder than expected due to recursion and a
not-so-good implementation in expr_negate (it went too high-level thus
resulting in multivec expressions getting to the code generator).
2023-08-28 17:00:14 +09:00
Bill Currie
6b1684b711 [qfcc] Implement mutli-vector division
But only for scalar divisors. The simple method of AB†/(BB†) works only
if B is a versor and there's also the problem of left and right
division. Thanks to sudgy for making me stop and think before I actually
implemented anything (though he mentioned only that it doesn't work for
general mutli-vector divisors).
2023-08-28 12:17:59 +09:00
Bill Currie
5b1ce309ef [qfcc] Implement multi-vector reversion
For a change, something that's actually general rather than specific to
PGA.
2023-08-28 11:56:35 +09:00
Bill Currie
717b09f33e [qfcc] Fix vector long tests
And the discovered typos (yes, I double-checked the values) in the PGA
tests.
2023-08-27 18:40:40 +09:00
Bill Currie
55b7547451 [qfcc] Get the rest of the main 2d PGA products working
That was tedious. I can't say I'm looking forward to writing the tests
for 3d. And even though trivector . bivector and bivector . trivector
give the same answer, they're not really commutative when it comes to
the code.
2023-08-27 15:24:35 +09:00
Bill Currie
74b7e0a35b [qfcc] Get some of 2d PGA mostly working
Better yet, some tests :)
2023-08-27 00:24:23 +09:00