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

Generated by: LCOV version 1.16