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 - base2.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30556-bb9f5f8fc8) Lines: 2225 2369 93.9 %
Date: 2025-11-25 09:20:50 Functions: 174 178 97.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Decomp 254569
Flx_checkdeflate 1599940
Flx_radical 1599937
FpX_radical 5668
Fp_basis 310742
FqM_to_nfM 1978
FqV_to_nfV 0
FqX_non_root 21
FqX_to_nfX 8217
Fq_to_nf 3057153
QXQV_to_FpM 197
QpXV_denom 508547
QpX_denom 2746885
QpX_remove_denom 1741297
RgV_nffix 49
RgX_nffix 319024
RgX_to_algX 1666
Rg_nffix 929239
ZX_Dedekind 1537315
ZX_rescale_inv 59994
Z_fac 197
Zlx_gcd 246056
Zlx_sylvester_echelon 4785492
ZpM_hnfmodid 453669
ZpX_disc_val 184170
ZpX_gcd 254575
ZpX_monic_factor 546
ZpX_monic_factor_squarefree 1155
ZpX_primedec 0
ZpX_reduced_resultant 992021
ZpX_reduced_resultant_fast 931023
ZpX_resultant_val 3566603
ZpX_resultant_val_i 3612735
ZpX_round4 896
ZpX_sylvester_echelon 73850
_msqr 1512
_sqr 8249
checkmodpr 210
checkprid 18046988
checkprid_i 23276848
compmod 286962
compositum 91
compositum2 2793
compositum_fix 26648
dbasis 620371
diag_denom 100040
diag_denomval 685643
ei_msqr_mod 350736
errprime 0
expo_is_squarefree 889
fact_from_factors 4130
ffdegree 4088
fill 2308
fix_PE 512
fnz 221881
gc_nf_to_Fq 13936263
gen_if_principal 35
get_LV 216444
get_coprimes 294
get_d 3025
get_g 355999
get_gamma 302882
get_maxord 812150
get_modpr 137753
get_module 63
get_norm 504744
get_nu 640587
get_partial_order_as_pols 508555
get_powers 160729
get_pr 415162
get_prid 939743
getprime 563180
hnf_Znproj 1081500
ideal_is1 5071
idealprimedec 1295208
idealprimedec_degrees 371
idealprimedec_galois 6552
idealprimedec_kummer 3916839
idealprimedec_limit_f 2812018
idealprimedec_limit_norm 507446
indexpartial 43219
init_m 4497569
init_norm 216407
is_uniformizer 504739
lift_to_zk 93468
loop 238409
manage_cache 705219
maxord 1537315
maxord_disc 711209
maxord_i 454569
minval 2238
mk_pr 4376125
modpr_TAU 4043052
modpr_genFq 4368
modprinit 1209680
mul_intersect 708836
mycaract 705257
newtoncharpoly 698415
newtonsums 705270
nfM_to_FqM 1244
nfV_to_FqV 167410
nfXQ_mul 9133
nfX_mul 12570
nfX_rem 9133
nfX_sub 3437
nfX_to_FqX 8001
nfX_to_monic 1680
nfXisintegral 6517
nf_pV_to_prV 37737
nf_pV_to_prVV 26600
nf_to_Fq 12919838
nf_to_Fq_i 13936779
nf_to_Fq_init 4042023
nfbasis 917
nfcompositum 13434
nfcompositum_lambda 504
nfdisc 66437
nfdiscfactors 644780
nfidealdet1 63
nfisintegral 27216
nfmaxord 100941
nfmaxord_check_args 812164
nfmodpr 350
nfmodprinit 7
nfmodprinit0 77
nfmodprlift 77
nfpolisintegral 5299
nfpolisintegral_i 5299
nfreducemodpr 210
ok_modpr 4908944
p_is_prime 2216
pol_min 118188
polcompositum0 12888
poldiscfactors 42
poldiscfactors_i 787787
pow_ei_mod_p 745260
pr_anti_uniformizer 1003783
pr_factorback 3964
pr_factorback_scal 3964
pradical 216442
primedec_aux 2818927
primedec_end 216444
progress 394202
redelt 48554
redelt_i 64298
rnfallbase 3066
rnfbasis 21
rnfdedekind 91
rnfdedekind_i 3465
rnfdet 14
rnfdisc_factored 868
rnfdiscf 77
rnfeltid_powmod 3484
rnfhnfbasis 7
rnfisfree 7
rnfjoinmodules 763
rnfjoinmodules_i 1154
rnfmaxord 3381
rnfsimplifybasis 0
rnfsteinitz 28
safe_Z_pvalrem 14693
setPE 745675
set_disc 812131
split_char 479750
sqr_mod 826734
testb2 66964
testc2 48554
to_ff_init 4076138
triv_order 1492
uniformizer 298828
update_den 3564970
update_fact 2444
update_phi 276359
vstar 623889
zk_to_Fq 6391173
zk_to_Fq_init 34090
zkmodprinit 174774
zx_z_div 1531633

Generated by: LCOV version 1.16