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) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 1216 1255 96.9 %
Date: 2026-02-23 02:23:56 Functions: 139 139 100.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
BAD2small 78
E2exp 804
Efuneq 31608
F2v_factorback 600
Flv_inv_p2 29088
Flv_red 522
Jordantame 66
Jordantameexpo 78
L0 527040
QV_normalize 1044
Q_krois 24360
RgV_addhalf 234
RgV_mirror 89268
RgXn_sqrtnu 36
al2cyE 1212
albe2u 198
allprims 723300
binomfact 99996
block0 18
checkhgm 1110
compu 1818
count2list 12
cyE_intersect 606
cycloE2cyclo 6
cyclodiscmodsq 108
cyclowt 88860
dirhgm_worker 3426
discprod 198
doprecomp 3144
doprecompmodp2 29088
eulfactameinit 90
forvecsort 84
frobpoltrunc 31686
gacfac 330
gapnpow 843816
get_CYCLOE 606
get_GF 29088
get_GH 29088
get_L0 29118
get_L1 32226
get_VPOLGA 600
get_achi 84
get_b1 834
get_dfp 32484
get_pad 3138
get_teich 3138
get_teich1 2526
get_u 402
gkgauss 49656
hgmC 201504
hgmCall 3144
hgmCallmodp2 29094
hgmCmodp2 15224940
hgmG 10536
hgmH 3348
hgmHmodp2 29088
hgmQ 10536
hgmU 246
hgm_get_BAD 32442
hgm_get_CYCLOE 10668
hgm_get_DEG 121554
hgm_get_HODGE 94134
hgm_get_MVALUE 594
hgm_get_OFFMPOL 559296
hgm_get_SIGNPAR 24540
hgm_get_SWAP 588
hgm_get_TT 75294
hgm_get_U 2520
hgm_get_U0 54
hgm_get_VAL 121584
hgm_get_VBE 30
hgm_get_VBEDEN 32226
hgm_get_VBENUM 32226
hgm_get_VPOLGA 598944
hgm_get_WT 93822
hgmalpha 18
hgmalphatogamma 198
hgmbydegree 18
hgmcharcond 222
hgmclass 32268
hgmcoef 72
hgmcoefs 342
hgmcyclo 6
hgmcyclotoalpha 89124
hgmeulerfactor 390
hgmeulerfactorlimit 31950
hgmfindvga 174
hgmgamma 18
hgmgammatoalpha 18
hgmgammatocyclo 18
hgminit 444
hgminit_i 444
hgmissymmetrical 6
hgmlfuninfty 174
hgmmodif 195198
hgmmoments 78
hgmmulti 21072
hgmparams 138
hgmsign 29088
hgmtrace 32448
hgmtwist 18
hodge 89268
initab 438
inv 3348
lfundivraw 30
lfunhgm 102
lfunhgm_i 96
lfunhgmispole 78
lfunhgmwild 84
listcond 84
listweil_i 1380
listweilallw_i 420
mangoldtexp 1170
mkal 156
mkalbe 18
mkallal 18
mkphi 18
mkpowers 31608
moebiusadd 9042
mul 30
ok_part 324
pari_close_hgm 1488
pari_init_hgm 1488
powers_u 31608
precomp 1824
primedivisors 522
remove_intersect 198
removebad 186
sumbinom 99996
sumdeg 109152
tag 96
tameexpo 12
teichmodp2 29088
umultop 174414
upowers_u 360
vecmellin 1464
zv_intersect 475656
zv_sumeuler 30
zv_to_prims 178248

Generated by: LCOV version 1.16