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 - hgm.c (source / functions) Coverage Total Hit
Test: PARI/GP v2.18.1 lcov report (development 31042-0fbe168e69) Lines: 96.9 % 1255 1216
Test Date: 2026-07-23 17:04:59 Functions: 100.0 % 139 139
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
cycloE2cyclo 7
hgmcyclo 7
hgmissymmetrical 7
count2list 14
tameexpo 14
hgmalpha 21
hgmbydegree 21
hgmgamma 21
hgmgammatoalpha 21
hgmgammatocyclo 21
hgmtwist 21
mkalbe 21
mkallal 21
mkphi 21
hgm_get_VBE 35
lfundivraw 35
mul 35
zv_sumeuler 35
RgXn_sqrtnu 42
hgm_get_U0 63
Jordantame 77
hgmcoef 84
BAD2small 91
Jordantameexpo 91
hgmmoments 91
lfunhgmispole 91
block0 97
forvecsort 98
get_achi 98
lfunhgmwild 98
listcond 98
eulfactameinit 105
lfunhgm_i 112
tag 112
lfunhgm 119
cyclodiscmodsq 126
hgmparams 161
mkal 182
hgmfindvga 203
hgmlfuninfty 203
removebad 217
albe2u 231
discprod 231
hgmalphatogamma 231
remove_intersect 231
hgmcharcond 259
RgV_addhalf 273
hgmU 287
ok_part 378
gacfac 385
hgmcoefs 399
upowers_u 420
hgmeulerfactor 455
get_u 469
listweilallw_i 490
initab 511
hgminit 518
hgminit_i 518
Flv_red 609
primedivisors 609
hgm_get_SWAP 686
hgm_get_MVALUE 693
F2v_factorback 700
get_VPOLGA 700
cyE_intersect 707
get_CYCLOE 707
E2exp 938
get_b1 973
QV_normalize 1218
checkhgm 1295
mangoldtexp 1365
al2cyE 1414
listweil_i 1610
vecmellin 1708
compu 2155
precomp 2162
hgm_get_U 2940
get_teich1 2947
get_pad 3661
get_teich 3661
doprecomp 3668
hgmCall 3668
hgmH 3906
inv 3906
dirhgm_worker 3997
moebiusadd 10549
hgmG 12292
hgmQ 12292
hgm_get_CYCLOE 12446
hgmmulti 24584
Q_krois 28420
hgm_get_SIGNPAR 28630
Flv_inv_p2 33936
doprecompmodp2 33936
get_GF 33936
get_GH 33936
hgmHmodp2 33936
hgmsign 33936
teichmodp2 33936
hgmCallmodp2 33943
get_L0 33971
Efuneq 36876
mkpowers 36876
powers_u 36876
frobpoltrunc 36967
hgmeulerfactorlimit 37275
get_L1 37597
hgm_get_VBEDEN 37597
hgm_get_VBENUM 37597
hgmclass 37646
hgm_get_BAD 37849
hgmtrace 37856
get_dfp 37898
gkgauss 57932
hgm_get_TT 87843
cyclowt 103670
hgmcyclotoalpha 103978
RgV_mirror 104146
hodge 104146
hgm_get_WT 109459
hgm_get_HODGE 109823
binomfact 116955
sumbinom 116955
sumdeg 127344
hgm_get_DEG 141813
hgm_get_VAL 141848
umultop 203902
zv_to_prims 207956
hgmmodif 227731
hgmC 235088
pari_close_hgm 378540
pari_init_hgm 378548
zv_intersect 554932
L0 614880
hgm_get_OFFMPOL 652512
hgm_get_VPOLGA 698768
allprims 843850
gapnpow 984452
hgmCmodp2 17762430

Generated by: LCOV version 2.0-1