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 30640-c2c58e18c5) Lines: 2227 2369 94.0 %
Date: 2026-01-27 08:51:18 Functions: 174 178 97.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Decomp 237605
Flx_checkdeflate 1452108
Flx_radical 1452104
FpX_radical 5543
Fp_basis 235694
FqM_to_nfM 2802
FqV_to_nfV 0
FqX_non_root 21
FqX_to_nfX 10112
Fq_to_nf 3030801
QXQV_to_FpM 203
QpXV_denom 474620
QpX_denom 2381852
QpX_remove_denom 1449780
RgV_nffix 49
RgX_nffix 289194
RgX_to_algX 1606
Rg_nffix 822537
ZX_Dedekind 1392163
ZX_rescale_inv 56090
Z_fac 197
Zlx_gcd 229237
Zlx_sylvester_echelon 4110091
ZpM_hnfmodid 404178
ZpX_disc_val 164936
ZpX_gcd 237610
ZpX_monic_factor 546
ZpX_monic_factor_squarefree 1155
ZpX_primedec 0
ZpX_reduced_resultant 822249
ZpX_reduced_resultant_fast 763353
ZpX_resultant_val 3079314
ZpX_resultant_val_i 3124140
ZpX_round4 896
ZpX_sylvester_echelon 73886
_msqr 4158
_sqr 14078
checkmodpr 210
checkprid 17620785
checkprid_i 22128083
compmod 236013
compositum 65
compositum2 2081
compositum_fix 24373
dbasis 537757
diag_denom 80074
diag_denomval 595734
ei_msqr_mod 306605
errprime 0
expo_is_squarefree 889
fact_from_factors 3416
ffdegree 1691
fill 4090
fix_PE 505
fnz 180190
gc_nf_to_Fq 13762386
gen_if_principal 35
get_LV 117197
get_coprimes 287
get_d 3190
get_g 293047
get_gamma 241753
get_maxord 746119
get_modpr 137753
get_module 63
get_norm 318493
get_nu 530792
get_partial_order_as_pols 474620
get_powers 97813
get_pr 273715
get_prid 939477
getprime 464276
hnf_Znproj 871635
ideal_is1 7455
idealprimedec 1188105
idealprimedec_degrees 371
idealprimedec_galois 6378
idealprimedec_kummer 3436510
idealprimedec_limit_f 2406408
idealprimedec_limit_norm 465388
indexpartial 16353
init_m 3842626
init_norm 117193
is_uniformizer 318493
lift_to_zk 31641
loop 198641
manage_cache 567985
maxord 1392165
maxord_disc 663915
maxord_i 405073
minval 3470
mk_pr 3718280
modpr_TAU 3339965
modpr_genFq 4508
modprinit 955199
mul_intersect 549379
mycaract 568014
newtoncharpoly 563278
newtonsums 568016
nfM_to_FqM 1806
nfV_to_FqV 167410
nfXQ_mul 14147
nfX_mul 18249
nfX_rem 14147
nfX_sub 4102
nfX_to_FqX 9331
nfX_to_monic 1620
nfXisintegral 7257
nf_pV_to_prV 37093
nf_pV_to_prVV 26590
nf_to_Fq 12592639
nf_to_Fq_i 13762892
nf_to_Fq_init 3338768
nfbasis 896
nfcompositum 12285
nfcompositum_lambda 511
nfdisc 19153
nfdiscfactors 644779
nfidealdet1 63
nfisintegral 31767
nfmaxord 82196
nfmaxord_check_args 746125
nfmodpr 350
nfmodprinit 7
nfmodprinit0 77
nfmodprlift 77
nfpolisintegral 8079
nfpolisintegral_i 8079
nfreducemodpr 210
ok_modpr 4194084
p_is_prime 1738
pol_min 84313
polcompositum0 11732
poldiscfactors 42
poldiscfactors_i 727700
pow_ei_mod_p 493449
pr_anti_uniformizer 764784
pr_factorback 4277
pr_factorback_scal 4277
pradical 117196
primedec_aux 2413153
primedec_end 117197
progress 330701
redelt 37370
redelt_i 47638
rnfallbase 3141
rnfbasis 21
rnfdedekind 91
rnfdedekind_i 4130
rnfdet 14
rnfdisc_factored 838
rnfdiscf 77
rnfeltid_powmod 5306
rnfhnfbasis 7
rnfisfree 7
rnfjoinmodules 1329
rnfjoinmodules_i 2045
rnfmaxord 4046
rnfsimplifybasis 0
rnfsteinitz 28
safe_Z_pvalrem 12215
setPE 726898
set_disc 746067
split_char 384737
sqr_mod 640307
testb2 48981
testc2 37370
to_ff_init 3361267
triv_order 1513
uniformizer 193680
update_den 3003272
update_fact 2360
update_phi 232411
vstar 521018
zk_to_Fq 6297434
zk_to_Fq_init 22501
zkmodprinit 170674
zx_z_div 1386568

Generated by: LCOV version 1.16