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 30793-1ceee7ca5f) Lines: 1468 1530 95.9 %
Date: 2026-04-10 09:27:03 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 296312
RgX_gtofp_bit 7048117
RgX_normalize1 35705
X2XP1 5990668
ZX_Uspensky 1313920
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 15203
ZX_graeffe 5439
ZX_realroots_irred 48574
ZX_rescale2prim 2233803
ZX_sturm 6395
ZX_sturm_i 123073
ZX_sturm_irred 116678
ZX_sturmpart 1128315
ZX_to_ZiX 16488568
ZiX_sqr 99231480
_gen_nored 11201554
_gen_one 14473761
_gen_zero 326027
_intervalcmp 0
_mp_add 24661993
_mp_cmul 34765877
_mp_mul 4374546
_mp_sqr 6298622
_mp_sub 0
_sqrtnr 22596
a_posteriori_errors 537466
abs_update 8020762
abs_update_r 780152
all_roots 536372
append_clone 1616170
bkeval_single_power 5235805
check_ab 1178942
checkbound 2355014
checkvalidpol 267214
clean_roots 536413
cleanroots 231763
cmp_complex_appr 2241471
conformal_basecase 1406434
conformal_mapping 468776
conformal_pol 1406553
dblexp 6562502
dbllog2 304007802
dft 503320
dual_modulus 1014478
eval_rel_pol 13168525
fft 14194250
fft2 7462
findpower 41029706
fix_roots 537466
fix_roots1 398788
fujiwara_bound 2272033
fujiwara_bound_real 1406989
graeffe 49601446
homothetie 1613570
homothetie2n 9979035
homothetie_gauss 36565373
ind_maxlog2 904348
initdft 998246
isexactpol 240103
isexactscalar 934017
isreal 963697
isvalidcoeff 1230445
logmax_modulus 4458574
logmin_modulus 1617676
logmodulus 608219
logpre_modulus 608220
logradius 494924
lower_bound 41029084
mydbllog2i 226869252
mydbllog2r 57612945
mydbllogr 9565067
mygprec 63862081
mygprec_absolute 4344251
mygprec_special 537475
mygprecrc 215563412
mygprecrc_special 2181425
myshiftic 136083446
myshiftrc 35577568
newton_polygon 5520795
optimize_split 494926
parameters 494926
pol_to_gaussint 17627221
polgraeffe 14
polmod_to_embed 84
polrootsbound 27104
polrootsbound_i 27097
polsolve 166706
quicktofp 6981491
realroots 50627
refine_F 503315
refine_H 2464562
root_error 1914411
roots 8368
roots_aux 240131
roots_com 240103
rootsdeg0 42
scalepol 4297318
scalepol2n 0
sol_ok 3378
solve_exact_pol 231495
split_0 495297
split_0_1 469145
split_0_2 469145
split_1 468773
split_2 494926
split_complete 1528065
split_fromU 494926
split_pols 166703
splitcauchy 166711
splitpoleval 5235740
tocomplex 1215885
update_radius 494927
usp 1126109

Generated by: LCOV version 1.16