Code coverage tests

This page documents the degree to which the PARI/GP source code is tested by our public test suite, distributed with the source distribution in directory src/test/. This is measured by the gcov utility; we then process gcov output using the lcov frond-end.

We test a few variants depending on Configure flags on the pari.math.u-bordeaux.fr machine (x86_64 architecture), and agregate them in the final report:

The target is to exceed 90% coverage for all mathematical modules (given that branches depending on DEBUGLEVEL or DEBUGMEM are not covered). This script is run to produce the results below.

LCOV - code coverage report
Current view: top level - basemath - ZX.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 710 789 90.0 %
Date: 2026-02-23 02:23:56 Functions: 94 105 89.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FqM_mul_Kronecker 70160
Kronecker_to_ZXQX 20706
Kronecker_to_ZXX 1499620
QXQM_mul 4108
QXQM_sqr 6
QXQX_QXQ_mul 2966
QXQX_mul 11466
QXQX_powers 408
QXQX_sqr 1632
QX_ZX_rem 1560415
QX_mul 2858545
QX_sqr 80102
RgXX_to_Kronecker 5666094
RgXX_to_Kronecker_spec 8496868
RgX_check_QX 315765
RgX_check_ZX 2380121
RgX_check_ZXX 876
Xpm1_powu 372
ZC_mod2BIL_FqC 261815
ZC_mod2BIL_ZXQC 12169
ZM_mod2BIL_FqM 70160
ZM_mod2BIL_ZXQM 5504
ZXC_eval2BIL 935526
ZXC_expi 935526
ZXM_eval2BIL 151208
ZXM_expi 151208
ZXQM_mul 5384
ZXQM_sqr 120
ZXQX_ZXQ_mul 7608
ZXQX_mul 19074
ZXQX_sqr 1632
ZXT_remi2n 23985
ZXV_ZX_fromdigits 0
ZXV_Z_mul 6408
ZXV_dotproduct 71074
ZXV_equal 24
ZXV_remi2n 0
ZXX_Z_add_shallow 0
ZXX_Z_divexact 48402
ZXX_Z_mul 7548
ZXX_evalx0 24611
ZXX_max_lg 4620
ZXX_mul_Kronecker 2568210
ZXX_renormalize 265954724
ZXX_sqr_Kronecker 4548
ZX_Z_add 66990
ZX_Z_add_shallow 80594
ZX_Z_divexact 4294218
ZX_Z_eval 409105
ZX_Z_mul 12069720
ZX_Z_sub 155014
ZX_Z_translate 3241830
ZX_Z_translate_basecase 3161499
ZX_add 32397238
ZX_affine 571492
ZX_copy 4691688
ZX_deriv 6527477
ZX_digits 0
ZX_div_by_X_1 15
ZX_divuexact 838110
ZX_equal 2336256
ZX_eval1 4044
ZX_eval2BIL 4763536
ZX_eval2BILspec 78368553
ZX_expi 4763536
ZX_expispec 143315109
ZX_max_lg 92070
ZX_mod_Xnm1 960806
ZX_mul 94947874
ZX_mulspec 102139134
ZX_mulspec_mulii 31303815
ZX_mulu 103792
ZX_neg 511763
ZX_rem 8855784
ZX_remi2n 70860
ZX_rescale 28611
ZX_rescale2n 0
ZX_rescale_lt 0
ZX_shifti 5513859
ZX_sqr 117291807
ZX_sqrspec 117291807
ZX_sqrspec_basecase 64946556
ZX_sqrspec_basecase_limb 254591906
ZX_sqrspec_sqri 14641161
ZX_sub 24967705
ZX_val 283840
ZX_valrem 24962076
ZX_valspec 279520852
ZXn_mul 2235372
ZXn_sqr 1350
Z_XpN_powu 0
Z_ZX_mulshiftspec 39632079
Z_ZX_sub 2283315
Z_mod2BIL_Fq 1028837
Z_mod2BIL_ZX 47028610
Z_mod2BIL_ZXQ 54797
Z_sqrshiftspec_ZX 37030393
_ZX_add 0
_ZX_divrem 0
_ZX_mul 0
_ZX_sqr 0
scalar_ZX 48042
scalar_ZX_shallow 19731
zx_to_ZX 1034
zx_z_divexact 80

Generated by: LCOV version 1.16