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 - rootpol.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30754-316d984fc8) Lines: 1467 1530 95.9 %
Date: 2026-03-19 09:26:57 Functions: 116 119 97.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FFT 56
FFT_i 98
FFTinv 56
QX_complex_roots 296310
RgX_gtofp_bit 7047974
RgX_normalize1 35705
X2XP1 5990563
ZX_Uspensky 1313851
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15203
ZX_graeffe 5439
ZX_realroots_irred 48573
ZX_rescale2prim 2233792
ZX_sturm 6395
ZX_sturm_i 123069
ZX_sturm_irred 116674
ZX_sturmpart 1128251
ZX_to_ZiX 16492867
ZiX_sqr 99237298
_gen_nored 11209319
_gen_one 14474521
_gen_zero 326010
_intervalcmp 0
_mp_add 24665558
_mp_cmul 34782451
_mp_mul 4374715
_mp_sqr 6298713
_mp_sub 0
_sqrtnr 22596
a_posteriori_errors 537469
abs_update 8021410
abs_update_r 780127
all_roots 536372
append_clone 1616155
bkeval_single_power 5236075
check_ab 1178878
checkbound 2354886
checkvalidpol 267214
clean_roots 536409
cleanroots 231763
cmp_complex_appr 2241485
conformal_basecase 1406448
conformal_mapping 468777
conformal_pol 1406568
dblexp 6562542
dbllog2 304082867
dft 503323
dual_modulus 1014492
eval_rel_pol 13168598
fft 14194191
fft2 7462
findpower 41032226
fix_roots 537470
fix_roots1 398788
fujiwara_bound 2271959
fujiwara_bound_real 1406917
graeffe 49610015
homothetie 1613569
homothetie2n 9979012
homothetie_gauss 36565371
ind_maxlog2 904386
initdft 998250
isexactpol 240103
isexactscalar 934017
isreal 963704
isvalidcoeff 1230445
logmax_modulus 4458645
logmin_modulus 1617697
logmodulus 608210
logpre_modulus 608207
logradius 494928
lower_bound 41031763
mydbllog2i 226904023
mydbllog2r 57610432
mydbllogr 9565834
mygprec 63865144
mygprec_absolute 4344242
mygprec_special 537476
mygprecrc 215572446
mygprecrc_special 2181411
myshiftic 136142609
myshiftrc 35576305
newton_polygon 5520684
optimize_split 494931
parameters 494929
pol_to_gaussint 17627202
polgraeffe 14
polmod_to_embed 84
polrootsbound 27104
polrootsbound_i 27097
polsolve 166708
quicktofp 6981296
realroots 50627
refine_F 503315
refine_H 2464613
root_error 1914418
roots 8368
roots_aux 240131
roots_com 240103
rootsdeg0 42
scalepol 4297373
scalepol2n 0
sol_ok 3378
solve_exact_pol 231495
split_0 495300
split_0_1 469147
split_0_2 469147
split_1 468776
split_2 494928
split_complete 1528073
split_fromU 494931
split_pols 166705
splitcauchy 166711
splitpoleval 5236294
tocomplex 1215871
update_radius 494928
usp 1126060

Generated by: LCOV version 1.16