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 30622-caa25a75db) Lines: 2227 2369 94.0 %
Date: 2026-01-22 09:18:00 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 87
rnfdedekind 91
Z_fac 197
QXQV_to_FpM 199
checkmodpr 210
nfreducemodpr 210
get_coprimes 290
nfmodpr 350
idealprimedec_degrees 371
fix_PE 508
nfcompositum_lambda 511
ZpX_monic_factor 546
nfbasis 844
rnfdisc_factored 854
expo_is_squarefree 889
ZpX_round4 896
ZpX_monic_factor_squarefree 1155
rnfjoinmodules 1329
triv_order 1513
RgX_to_algX 1638
nfX_to_monic 1652
nfM_to_FqM 1861
p_is_prime 2095
rnfjoinmodules_i 2100
update_fact 2276
compositum2 2618
FqM_to_nfM 2912
rnfallbase 3165
get_d 3214
ffdegree 3672
minval 3725
fact_from_factors 3977
rnfmaxord 4072
nfX_sub 4128
rnfdedekind_i 4156
_msqr 4158
fill 4200
pr_factorback 4277
pr_factorback_scal 4277
modpr_genFq 4508
FpX_radical 5609
rnfeltid_powmod 5746
idealprimedec_galois 6518
nfXisintegral 7307
ideal_is1 7950
nfpolisintegral 8203
nfpolisintegral_i 8203
nfX_to_FqX 9375
FqX_to_nfX 10188
polcompositum0 11328
nfcompositum 11881
safe_Z_pvalrem 14159
_sqr 15838
nfXQ_mul 16127
nfX_rem 16127
nfX_mul 20255
compositum_fix 23542
nf_pV_to_prVV 26521
nfisintegral 32120
zk_to_Fq_init 32155
nf_pV_to_prV 37939
indexpartial 38704
redelt 42552
testc2 42552
ZX_rescale_inv 52065
redelt_i 57080
nfdisc 58205
testb2 60340
ZpX_sylvester_echelon 73687
lift_to_zk 82697
diag_denom 92507
nfmaxord 93623
pol_min 108140
get_modpr 137753
get_powers 145632
ZpX_disc_val 166445
nfV_to_FqV 167410
zkmodprinit 174095
init_norm 193999
pradical 194002
get_LV 194003
primedec_end 194003
fnz 208778
loop 211402
Zlx_gcd 217055
Decomp 225486
ZpX_gcd 225486
update_phi 243015
compmod 253954
uniformizer 271076
get_gamma 271745
Fp_basis 285524
get_g 317512
RgX_nffix 320335
ei_msqr_mod 332073
progress 347956
get_pr 377654
ZpM_hnfmodid 400697
maxord_i 401591
split_char 428086
QpXV_denom 450370
get_partial_order_as_pols 450370
get_norm 455196
is_uniformizer 455196
getprime 499104
idealprimedec_limit_norm 499495
dbasis 546021
vstar 551872
nfdiscfactors 552693
get_nu 568209
diag_denomval 596677
maxord_disc 610891
newtoncharpoly 621198
manage_cache 627412
newtonsums 627418
mycaract 627419
setPE 646307
mul_intersect 653471
pow_ei_mod_p 679048
poldiscfactors_i 681948
set_disc 704512
get_maxord 704516
nfmaxord_check_args 704523
sqr_mod 771719
ZpX_reduced_resultant_fast 822337
ZpX_reduced_resultant 880594
Rg_nffix 927091
get_prid 939477
pr_anti_uniformizer 955354
hnf_Znproj 1039751
modprinit 1158872
idealprimedec 1273664
zx_z_div 1346679
maxord 1352295
ZX_Dedekind 1352296
Flx_radical 1408563
Flx_checkdeflate 1408566
QpX_remove_denom 1543959
QpX_denom 2457649
idealprimedec_limit_f 2726572
primedec_aux 2733458
Fq_to_nf 3075532
update_den 3211180
ZpX_resultant_val 3423635
ZpX_resultant_val_i 3469049
idealprimedec_kummer 3813214
nf_to_Fq_init 3910621
modpr_TAU 3911804
to_ff_init 3942776
mk_pr 4227298
init_m 4245970
Zlx_sylvester_echelon 4501462
ok_modpr 4775593
zk_to_Fq 6475757
nf_to_Fq 12860029
gc_nf_to_Fq 14110426
nf_to_Fq_i 14110944
checkprid 18012355
checkprid_i 23096963

Generated by: LCOV version 1.16