*Appendix A.4. Testing and Validation*

GTC has a modular structure. It uses Python arithmetic operator overloading and mathematical function definitions to decompose mathematical expressions into basic uncertain-number operations. This makes the code amenable to unit testing. The calculation of values uses standard Python mathematical operations and processing of components of uncertainty uses of automatic differentiation, which also makes use of built-in Python arithmetic and mathematical libraries. An extensive suite of test cases has been built up to verify implementation details [5]. Calculations are also checked against standard examples from appendices to the GUM and other published sources, including various forms of regression analyses with uncertainties. Moreover, GTC has been used for more than a decade at the Measurement Standards Laboratory, where it is closely scrutinised by different groups. Very few issues have been reported since the project was made publicly available on github in 2018.

#### *Appendix A.5. Similar Software*

Software to evaluate measurement uncertainty is often used alongside other data processing tools (a notable example is the web-based calculator called *The NIST Uncertainty Machine* [21]). However, the separation of data processing into different work streams is unnecessary with GTC, because uncertainty calculation is an integral part of all data processing. GTC may be incorporated in projects to provide data processing and support for traceability. This is also the case for the C# library called *UncLib* [22], which is part of the data acquisition and data processing application called *VNA Tools II* [23], now used by many leading microwave metrology laboratories. Similarly to GTC, UncLib handles measurements of real-valued and complex-valued quantities and provides support for traceability by identifying input quantities and allowing them to be stored and retrieved. However, the data structures of UncLib have been designed to support a particular optimisation strategy, which results in some different behaviours (see Zeier et al. [22] [Section 3.3]). For instance, the evaluation of the intermediate components of uncertainty may fail unless certain preconditions are satisfied [22] [Section 3.4] and the extensions to the Welch–Satterthwaite formula and degrees of freedom support for complex quantities cannot be implemented.

A well-known Python package that calculates uncertainty is *Uncertainties* [24]. This package is intended for engineering error and sensitivity analyses, such as described by Bevington and Robinson [25]. Similarly to GTC and UncLib, uncertainties use automatic differentiation to evaluate partial derivatives during data processing. However, it does not calculate degrees of freedom, nor does it handle complex quantities or provide for storage and retrieval of results.
