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 30759-17b423fb9b) Lines: 1467 1530 95.9 %
Date: 2026-03-20 09:26:27 Functions: 116 119 97.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
_intervalcmp 0
_mp_sub 0
scalepol2n 0
ZX_Uspensky_equal_yes 14
polgraeffe 14
ZX_Uspensky_no 21
ZX_Uspensky_equal 28
rootsdeg0 42
FFT 56
FFTinv 56
polmod_to_embed 84
FFT_i 98
sol_ok 3378
ZX_graeffe 5439
ZX_sturm 6395
fft2 7462
roots 8368
ZX_deg1root 15201
_sqrtnr 22594
polrootsbound_i 27097
polrootsbound 27104
RgX_normalize1 35705
ZX_realroots_irred 48571
realroots 50627
ZX_sturm_irred 116674
ZX_sturm_i 123069
polsolve 166706
split_pols 166710
splitcauchy 166712
solve_exact_pol 231495
cleanroots 231763
isexactpol 240103
roots_com 240103
roots_aux 240131
checkvalidpol 267214
QX_complex_roots 296305
_gen_zero 326005
fix_roots1 398789
split_1 468781
conformal_mapping 468782
split_0_1 469153
split_0_2 469154
logradius 494927
parameters 494929
optimize_split 494930
split_fromU 494930
update_radius 494930
split_2 494932
split_0 495300
refine_F 503321
dft 503323
all_roots 536361
clean_roots 536409
a_posteriori_errors 537463
fix_roots 537467
mygprec_special 537473
logmodulus 608201
logpre_modulus 608204
abs_update_r 780115
ind_maxlog2 904371
isexactscalar 934017
isreal 963711
initdft 998253
dual_modulus 1014495
usp 1126176
ZX_sturmpart 1128335
check_ab 1178962
tocomplex 1215856
isvalidcoeff 1230445
ZX_Uspensky 1313933
conformal_basecase 1406464
conformal_pol 1406582
fujiwara_bound_real 1407002
split_complete 1528065
homothetie 1613572
append_clone 1616151
logmin_modulus 1617709
root_error 1914414
mygprecrc_special 2181397
ZX_rescale2prim 2233970
cmp_complex_appr 2241403
fujiwara_bound 2272038
checkbound 2355054
refine_H 2464613
scalepol 4297395
mygprec_absolute 4344114
_mp_mul 4374558
logmax_modulus 4458662
bkeval_single_power 5235457
splitpoleval 5236325
newton_polygon 5520575
X2XP1 5991036
_mp_sqr 6298506
dblexp 6562522
quicktofp 6981467
RgX_gtofp_bit 7047925
abs_update 8021453
mydbllogr 9565927
homothetie2n 9978868
_gen_nored 11207595
eval_rel_pol 13168505
fft 14194393
_gen_one 14474852
ZX_to_ZiX 16491768
pol_to_gaussint 17627116
_mp_add 24664376
_mp_cmul 34777094
myshiftrc 35576056
homothetie_gauss 36562152
findpower 41029752
lower_bound 41030552
graeffe 49605096
mydbllog2r 57611095
mygprec 63864006
ZiX_sqr 99223991
myshiftic 136125861
mygprecrc 215569110
mydbllog2i 226882523
dbllog2 304058935

Generated by: LCOV version 1.16