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 - lfunutils.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 1645 1789 92.0 %
Date: 2026-02-23 02:23:56 Functions: 167 177 94.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Flx_difftable 1836
Flx_genus2trace_naive 1836
RgV_Rg_translate 90
_direuler_abelrel 589614
abelrel_factor 589650
abelrel_pfactor 848958
artin_badprimes 1182
artin_charfromgens 102
artin_dim 2754
artin_gamma 1182
artin_ind 534
artin_ram 1956
c4c6_ap 0
c4c6_testp 0
char_dim 2418
char_expand 2448
char_is_real 1182
char_renormalize 1032
check_0 114
check_real 114
checkldata 91396
chigeneval_i 90966
chigenevalvec 74340
chigenkerfind 456
closure2ldata 156
cyclo_is_real 5568
cyclotoi 6600
cyclotos 2478
deg1ser_shallow 288
dirartin 46284
dirartin_worker 13428
direllsympow_worker 4848
dirgenus2 1986
dirgenus2_worker 792
dirzetak 1806
dirzetak0 1806
elldiscfix 60
ellminimaldotwist 162
ellsympow 77184
ellsympow_abelian 2682
ellsympow_abelian_twist 0
ellsympow_betam 168
ellsympow_deltam2 24
ellsympow_deltam3 60
ellsympow_epsm 84
ellsympow_gamma 120
ellsympow_goodred 0
ellsympow_goodred2 24
ellsympow_goodred3 60
ellsympow_inertia2 24
ellsympow_inertia3 60
ellsympow_isabelian2 0
ellsympow_isabelian3 0
ellsympow_multred 84
ellsympow_nonabelian 84
ellsympow_rootno2 0
ellsympow_rootno3 30
ellsympow_trace 74526
ellsymsq_bad2 24
ellsymsq_bad3 12
ellsymsq_badp 36
eta_ZXn 1042
eta_product_ZXn 276
etachar 174
etacuspidal 198
etaquotype 222
etaselfdual 42
eulerf_abelrel 36
eulerf_artin 24
eulerf_bad 48
eulerf_chiZ 36
eulerf_chigen 24
eulerf_closure 60
eulerf_conj 0
eulerf_div 12
eulerf_ellsympow 24
eulerf_genus2 0
eulerf_hgm 72
eulerf_mul 36
eulerf_shift 48
eulerf_twist 12
eulerf_zetak 144
gaddmul 1638336
gaddmulvec 1551102
galois_get_conj 226
gamma_imagchi 2052
ginvvec 498
handle_zeta 1368
idealfrobenius_easy 44916
idealfrobenius_hard 1368
is_ldata 109946
is_tagged 91492
ldata_eulerf 780
ldata_newprec 28377
ldata_vecan 27999
lfunabelianrelinit 456
lfunabelrel 18
lfunabelrel_i 474
lfunartin 1380
lfunchiZ 7227
lfunchigen 1314
lfunchiinit 1098
lfunchiquad 5908
lfuncombdual 120
lfunconj 72
lfunconvol 72
lfunconvolinv 48
lfuncreate 3468
lfuncreate_tag 540
lfundatatype 15208
lfundiv 48
lfundivpoles 48
lfundual 552
lfundualpoles 252
lfunell 3480
lfunellQ 3306
lfunellmfpeters 60
lfunellmfpetersmintwist 60
lfunellnf 174
lfunellsympow 120
lfunellsymsqmintwist 60
lfunetaquo 42
lfuneuler 618
lfungenus2 36
lfunmfspec 36
lfunmfspec_i 36
lfunmisc_to_ldata 3018
lfunmisc_to_ldata_i 106208
lfunmisc_to_ldata_shallow 84995
lfunmisc_to_ldata_shallow_i 18195
lfunmul 54
lfunmul_k 72
lfunmulpoles 72
lfunparams 114
lfunproduct 282
lfunqf 78
lfunshift 90
lfunsympow 60
lfuntwist 4446
lfunvgasub 48
lfunzeta 3512
lfunzetak 714
lfunzetak_i 1080
lfunzetakinit 822
lfunzetakinit_artin 18
lfunzetakinit_quotient 282
linit_get_mat 564
localfactor 50532
mfpeters 60
mkvchi 4452
orderpole 240
pole_translate 24
poles_translate 12
qfiseven 288
rtopoles 156
safe_Z_pvalrem 0
simple_pole 234
tag 22600
vec01 4044
vec_classes 456
vecan_Kronecker 3140
vecan_abelrel 144
vecan_artin 2526
vecan_chiZ 3120
vecan_chigen 1332
vecan_closure 1697
vecan_conj 108
vecan_div 540
vecan_ellsympow 294
vecan_eta 126
vecan_genus2 174
vecan_mul 354
vecan_qf 342
vecan_shift 648
vecan_twist 2472
vecchar_renormalize 18
veclfunchiinit 456

Generated by: LCOV version 1.16