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.1 lcov report (development 29950-285c5b69ed) Lines: 1697 1846 91.9 %
Date: 2025-02-05 09:09:51 Functions: 170 185 91.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_invgen 5711637
Q_nffactor 28170
Q_to_famat 197149
RM_round_maxrank 97417
ZM_famat_limit 568191
ZV_cba 28
ZV_cba_extend 49
Z_cba 413000
Z_cba_rec 3766434
Z_dcba_rec 0
Z_ppgle 0
Z_ppio 532903
Z_ppo 18157507
Z_to_famat 376357
_idealaddtoone 730709
_idealmulred 28572
_idealsqrred 35654
_mul 11365
_sqr 35654
addmul_mat 65203
append 151941
chk_vdir 21
err_divexact 7
ext_inv 20410
ext_mul 60755
ext_pow 0
ext_sqr 33869
factorbackprime 61535
famatV_factorback 13765
famatV_zv_factorback 46753
famat_Z_gcd 0
famat_add 158605
famat_div 200157
famat_div_shallow 10304
famat_idealfactor 0
famat_inv 199364
famat_inv_shallow 26969
famat_makecoprime 2003839
famat_mul 447430
famat_mul_shallow 200592
famat_mulpow_shallow 88309
famat_mulpows_shallow 118548
famat_pow 60642
famat_pow_shallow 62036
famat_pows_shallow 123144
famat_reduce 295921
famat_remove_trivial 53791
famat_sqr 22921
famat_sub 20942
famat_to_Fp_coprime 693
famat_to_nf 0
famat_to_nf_moddivisor 20118
famatsmall_reduce 176594
get_random_a 117237
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 285355
idealHNF_factor 239605
idealHNF_factor_i 285355
idealHNF_inv 68395
idealHNF_inv_Z 210503
idealHNF_mul 469945
idealHNF_mul_two 922924
idealHNF_norm_pval 4043401
idealHNF_val 4178927
idealadd 81609
idealaddmultoone 35
idealaddtoone 98
idealaddtoone0 70
idealaddtoone_i 17605
idealaddtoone_raw 713100
idealappr 14
idealappr0 14
idealapprfact 0
idealapprfact_i 54037
idealcoprime 84
idealcoprimefact 37210
idealdiv 39316
idealdiv0 56
idealdivexact 5034
idealdivpowprime 11971
idealdown 3038
idealfactor 267425
idealfactor_limit 267895
idealfactor_partial 25508
idealhnf 595
idealhnf0 413
idealhnf_principal 1309396
idealhnf_shallow 1720447
idealhnf_two 738579
idealintersect 21
idealinv 114137
idealismaximal 77
idealismaximal_i 77
idealismaximal_int 42
idealismaximal_mat 21
idealispower 3926
idealmin 7
idealmul 506117
idealmul0 70
idealmul_aux 506117
idealmulelt 264958
idealmulpowprime 767421
idealmulred 17207
idealnorm 104631
idealnumden 379234
idealpow 888559
idealpow0 2499
idealpow_aux 888563
idealpowprime 1196363
idealpowred 80266
idealpows 274612
idealprod 826
idealprodprime 525
idealprodval 1819
idealpseudomin 142950
idealpseudomin_nonscalar 0
idealpseudominvec 1204363
idealpseudored 1285445
idealred0 138662
idealred_elt 13809
idealredmodpower 49166
idealredmodpower_i 98322
idealsqr 38902
idealsqr_aux 38902
idealsqrprime 285643
idealsqrtn_int 7796
idealtwoelt 96826
idealtwoelt0 2485
idealtwoelt2 42
idealtyp 15839215
idealval 9397642
in_ideal 28
isideal 91
lcmuu 1588037
make_integral 10920
mat_ideal_two_elt 249767
mat_ideal_two_elt2 21
matreduce 63
nfV_eltembed 84
nfV_idealhnf 84
nf_coprime_part 126
nf_get_Gtwist 138669
nf_get_Gtwist1 12597
nf_remove_denom_p 4140474
nf_to_Fp_coprime 120162
nfdivmodpr 0
nfkermodpr 0
nfmulmodpr 7
nfpowmodpr 0
nfsolvemodpr 0
nfweilheight 84
nfweilheight_i 84
not_in_ideal 14
ok_elt 223330
p_makecoprime 94859
prV_e_muls 28174
prV_lcm_capZ 81995
prV_primes 61075
pr_hnf 3579238
pr_inv 17822
pr_inv_p 38398
pr_uniformizer 58170
ramified_root 7789
ramified_root_simple 7
sunits_makecoprime 98
to_Fp_coprime 123340
to_famat 0
to_famat_shallow 2688556
trivial_merge 28
twistG 12639
u_ppo 54219381
vec_mulid 91
vecdiv 903
vecinv 826
vecmul 16005547
vecpow 0
vecsqr 185983
zk_pvalrem 4094642

Generated by: LCOV version 1.16