17Verification
17.1 Identities
The identities1 listed in Table 17.1 serve as a useful check on the consistency of the various types of multiplication and other operations supported within Clifford algebra. These identities hold for any number of dimensions, and for any signature: uniformly positive or negative, or mixed positive, negative and zero.
If any of the identities fail for a numerical implementation, it indicates some inconsistency or error in that particular implementation. However, even if all of the identities are honoured that does not guarantee all operations are performing correctly, only consistently.
17.2 Tests
The easiest way to test the identities in Table 17.1 for a numerical implementation is by computing them for a large number of cases and evaluating the error in relation to the expected floating point precision of the machine.
17.2.1 Example Code
The program code listed in Example 17.1a invokes routines which individually calculate each of the identities, subtracting one side from the other and accumulating any error.
The code runs the tests for a chosen dimension ‘dim
’ and a chosen signature ‘sig
’ passed in the argument list on line 1. The signature is established as either all on lines 13 and 15 or, if the variable ‘sig
’ has value zero, randomly mixed on lines 14 and 15, and lines 26–51.
All 26 tests are run multiple times ‘’ within the loop between ...
Get Numerical Calculations in Clifford Algebra now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.