From aa9be53b6ecb3cb5cfcb8d52df0a6a568d308b10 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 19 Jan 2024 15:26:18 +0900 Subject: [PATCH] [qfcc] Include divide by two in commutator product I had forgotten this, and of course didn't have any tests. --- tools/qfcc/source/expr_algebra.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/qfcc/source/expr_algebra.c b/tools/qfcc/source/expr_algebra.c index c0c3419db..fddcae4b7 100644 --- a/tools/qfcc/source/expr_algebra.c +++ b/tools/qfcc/source/expr_algebra.c @@ -2560,7 +2560,8 @@ commutator_product (const expr_t *e1, const expr_t *e2) { auto ab = geometric_product (e1, e2); auto ba = geometric_product (e2, e1); - return multivector_sum ('-', ab, ba); + return algebra_binary_expr ('/', multivector_sum ('-', ab, ba), + new_int_expr (2)); } static const expr_t *