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 - base4.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.0 lcov report (development 29806-4d001396c7) Lines: 1696 1845 91.9 %
Date: 2024-12-22 09:08:28 Functions: 170 185 91.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_invgen 5744542
Q_nffactor 28059
Q_to_famat 197169
RM_round_maxrank 97272
ZM_famat_limit 568186
ZV_cba 28
ZV_cba_extend 35
Z_cba 412832
Z_cba_rec 3765118
Z_dcba_rec 0
Z_ppgle 0
Z_ppio 532735
Z_ppo 18145056
Z_to_famat 376397
_idealaddtoone 732617
_idealmulred 28572
_idealsqrred 35651
_mul 11365
_sqr 35651
addmul_mat 65420
append 151935
chk_vdir 21
err_divexact 7
ext_inv 20391
ext_mul 60736
ext_pow 0
ext_sqr 33866
factorbackprime 61150
famatV_factorback 13765
famatV_zv_factorback 46725
famat_Z_gcd 0
famat_add 158590
famat_div 200193
famat_div_shallow 10304
famat_idealfactor 0
famat_inv 199365
famat_inv_shallow 26974
famat_makecoprime 2003787
famat_mul 447451
famat_mul_shallow 200417
famat_mulpow_shallow 88281
famat_mulpows_shallow 118507
famat_pow 60642
famat_pow_shallow 62008
famat_pows_shallow 123126
famat_reduce 295802
famat_remove_trivial 53784
famat_sqr 22918
famat_sub 20958
famat_to_Fp_coprime 693
famat_to_nf 0
famat_to_nf_moddivisor 20118
famatsmall_reduce 176590
get_random_a 122184
gpidealfactor 182
gpidealval 7119
hnf_QC_QC 7
hnf_Q_Q 21
hnf_Q_QC 77
hnf_Z_QC 70
hnf_Z_ZC 77
idealHNF_Z_factor 0
idealHNF_Z_factor_i 285629
idealHNF_factor 239944
idealHNF_factor_i 285629
idealHNF_inv 81176
idealHNF_inv_Z 223264
idealHNF_mul 485720
idealHNF_mul_two 931539
idealHNF_norm_pval 4045810
idealHNF_val 4181502
idealadd 109602
idealaddmultoone 35
idealaddtoone 98
idealaddtoone0 70
idealaddtoone_i 19754
idealaddtoone_raw 712862
idealappr 14
idealappr0 14
idealapprfact 0
idealapprfact_i 53946
idealcoprime 84
idealcoprimefact 37211
idealdiv 40555
idealdiv0 56
idealdivexact 4880
idealdivpowprime 11537
idealdown 3031
idealfactor 267744
idealfactor_limit 268123
idealfactor_partial 25501
idealhnf 574
idealhnf0 413
idealhnf_principal 1370794
idealhnf_shallow 1747609
idealhnf_two 739319
idealintersect 21
idealinv 152324
idealismaximal 77
idealismaximal_i 77
idealismaximal_int 42
idealismaximal_mat 21
idealispower 3919
idealmin 7
idealmul 579274
idealmul0 70
idealmul_aux 579275
idealmulelt 306076
idealmulpowprime 770174
idealmulred 17207
idealnorm 104323
idealnumden 379463
idealpow 887746
idealpow0 2499
idealpow_aux 887749
idealpowprime 1198111
idealpowred 80264
idealpows 274640
idealprod 462
idealprodprime 483
idealprodval 2904
idealpseudomin 143039
idealpseudomin_nonscalar 0
idealpseudominvec 1204345
idealpseudored 1285172
idealred0 138654
idealred_elt 13905
idealredmodpower 49062
idealredmodpower_i 98111
idealsqr 38535
idealsqr_aux 38535
idealsqrprime 285473
idealsqrtn_int 7782
idealtwoelt 108949
idealtwoelt0 2485
idealtwoelt2 42
idealtyp 16096248
idealval 9399319
in_ideal 28
isideal 91
lcmuu 1598845
make_integral 10920
mat_ideal_two_elt 263939
mat_ideal_two_elt2 21
matreduce 63
nfV_eltembed 84
nfV_idealhnf 84
nf_coprime_part 126
nf_get_Gtwist 138661
nf_get_Gtwist1 12597
nf_remove_denom_p 4144718
nf_to_Fp_coprime 120090
nfdivmodpr 0
nfkermodpr 0
nfmulmodpr 7
nfpowmodpr 0
nfsolvemodpr 0
nfweilheight 84
nfweilheight_i 84
not_in_ideal 14
ok_elt 229057
p_makecoprime 94940
prV_e_muls 28086
prV_lcm_capZ 81904
prV_primes 61285
pr_hnf 3581334
pr_inv 18378
pr_inv_p 39499
pr_uniformizer 58002
ramified_root 7775
ramified_root_simple 7
sunits_makecoprime 98
to_Fp_coprime 123268
to_famat 0
to_famat_shallow 2688578
trivial_merge 28
twistG 12639
u_ppo 54247696
vec_mulid 91
vecdiv 903
vecinv 826
vecmul 15993626
vecpow 0
vecsqr 185983
zk_pvalrem 4098926

Generated by: LCOV version 1.16