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 - modules - stark.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 1676 1810 92.6 %
Date: 2026-02-23 02:23:56 Functions: 129 131 98.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
AChi 1520
AddMulCoeff 4408551
AllArtinNumbers 524
AllChars 295
AllStark 470
ArtinNumber 744
CHI_eval 460517
CHI_eval_n 461785
CharEval 10505
CharEval_n 10545
CharNewPrec 230
ComputeCoeff 1197
ComputeKernel 325
CopyCoeff 257113
CorrectCoeff 1724
CplxModulus 235
EvalCoeff 2618219
FindModulus 230
FreeMat 4775
GCD24 581
GenusFieldQuadImag 290
GenusFieldQuadReal 10
GetST 289
GetST0 142
GetValue 959
GetValue1 30
InitChar 289
InitMatAn 3051
InitPrimes 377
InitPrimesQuad 147
InitQuotient 950
InitReduction 1724
IsGoodSubgroup 370
IsZero 5482544
L_vanishes_at_0 765
LiftChar 2633
MulCoeff 1073993
NextElt 578838
Polmod2Coeff 285514
QuadGetST 177
RecCoeff 390
RecCoeff2 1540
RecCoeff3 298
RgX_findquad 10
ST_alloc 319
TestOne 1842
_0toCoeff 711717
_ZV_cmp 90
_addmulrr 37342414
_addrr 76280236
_data3 408
_sercoeff 333624
abmap_kernel 325
abmap_subgroup_image 11934
affect_coeff 333624
an_AddMul 257113
an_mul 79231
an_set0 75
an_set0_coprime 71708
bnrL1 60
bnrrootnumber 66
bnrstark 147
bnrstark_cyclic 0
bnrstarkunit 10
ch_deg 959
ch_get3 1200
chi_get_c 13563
chi_get_deg 39111
chk_reccoeff 286
chk_reccoeff_init 298
clear_cScT 383
compocyclo 25
compocyclop 10
computeP2 50
computean 527
computeth2 3110
cyc2elts 38176
cyc_is_cyclic 835
d1 255948
d2 85300
deg0 25
deg11 318
deg12 17553
deg2 18969
divcond 350
do_compo 35
ellphist 6220
ellphistinit 3110
eval_i 1426
findbezk 3160
findbezk_pol 50
findquad 50
galoisapplypol 10
get_Char 2682
get_P 519
get_cS_cT 374677
get_i0 142
get_ilambda 590
get_lambda 50
get_om 3110
get_prdiff 130
get_prec 0
getallelts 50
getallrootsof1 50
gpq 2930
hasexp2 581
init_CHI 3018
init_CHI_C 1164
init_CHI_alg 1854
init_cScT 241
init_pq 35
isZ 85
makescind 95
mpvecpowdiv 167
ppgamma 241
qfbforms 325
quadhilbert 412
quadhilbertimag 330
quadhilbertreal 105
quadray 117
quadray_init 607
sortChars 289
split_pol_quad 95
subgp_intersect 405
subgroup_classes 235
to_approx 6270
treatspecialsigma 85
uhasexp2 945
zeta_get_N0 476
zeta_get_i0 142
zeta_get_limx 377

Generated by: LCOV version 1.16