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.16.2 lcov report (development 29466-df46cf9131) Lines: 1693 1845 91.8 %
Date: 2024-07-27 09:04:25 Functions: 170 185 91.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_invgen 5555696
Q_nffactor 26885
Q_to_famat 197053
RM_round_maxrank 96369
ZM_famat_limit 568118
ZV_cba 28
ZV_cba_extend 35
Z_cba 412818
Z_cba_rec 3764992
Z_dcba_rec 0
Z_ppgle 0
Z_ppio 532721
Z_ppo 19910941
Z_to_famat 376251
_idealaddtoone 731748
_idealmulred 28589
_idealsqrred 35676
_mul 11382
_sqr 35676
addmul_mat 67337
append 151946
chk_vdir 21
err_divexact 7
ext_inv 20368
ext_mul 60758
ext_pow 0
ext_sqr 33891
factorbackprime 57566
famatV_factorback 13759
famatV_zv_factorback 46529
famat_Z_gcd 0
famat_add 158599
famat_div 200051
famat_div_shallow 10304
famat_idealfactor 0
famat_inv 199313
famat_inv_shallow 26968
famat_makecoprime 2003511
famat_mul 447355
famat_mul_shallow 199533
famat_mulpow_shallow 88316
famat_mulpows_shallow 117985
famat_pow 60642
famat_pow_shallow 62037
famat_pows_shallow 122846
famat_reduce 295257
famat_remove_trivial 53616
famat_sqr 22943
famat_sub 20846
famat_to_Fp_coprime 693
famat_to_nf 0
famat_to_nf_moddivisor 20118
famatsmall_reduce 176590
get_random_a 121850
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 284532
idealHNF_factor 239088
idealHNF_factor_i 284532
idealHNF_inv 78908
idealHNF_inv_Z 217560
idealHNF_mul 388689
idealHNF_mul_two 799795
idealHNF_norm_pval 3990803
idealHNF_val 4127009
idealadd 108265
idealaddmultoone 35
idealaddtoone 98
idealaddtoone0 70
idealaddtoone_i 19768
idealaddtoone_raw 711979
idealappr 14
idealappr0 14
idealapprfact 0
idealapprfact_i 53890
idealcoprime 84
idealcoprimefact 37205
idealdiv 39792
idealdiv0 56
idealdivexact 4404
idealdivpowprime 9997
idealdown 2982
idealfactor 265701
idealfactor_limit 266080
idealfactor_partial 25424
idealhnf 308
idealhnf0 217
idealhnf_principal 1366638
idealhnf_shallow 1743755
idealhnf_two 683234
idealintersect 21
idealinv 149137
idealismaximal 70
idealismaximal_i 70
idealismaximal_int 35
idealismaximal_mat 21
idealispower 3660
idealmin 7
idealmul 575319
idealmul0 70
idealmul_aux 575319
idealmulelt 304682
idealmulpowprime 729941
idealmulred 17207
idealnorm 99885
idealnumden 377909
idealpow 825414
idealpow0 84
idealpow_aux 825414
idealpowprime 1104839
idealpowred 80202
idealpows 274581
idealprod 462
idealprodprime 336
idealprodval 2806
idealpseudomin 139964
idealpseudomin_nonscalar 0
idealpseudominvec 1204394
idealpseudored 1284127
idealred0 138599
idealred_elt 10886
idealredmodpower 48620
idealredmodpower_i 97230
idealsqr 38560
idealsqr_aux 38560
idealsqrprime 281933
idealsqrtn_int 7264
idealtwoelt 102867
idealtwoelt0 70
idealtwoelt2 42
idealtyp 16075617
idealval 9470776
in_ideal 28
isideal 91
lcmuu 1508670
make_integral 10920
mat_ideal_two_elt 257754
mat_ideal_two_elt2 21
matreduce 63
nfV_eltembed 84
nfV_idealhnf 84
nf_coprime_part 126
nf_get_Gtwist 138606
nf_get_Gtwist1 12583
nf_remove_denom_p 4102897
nf_to_Fp_coprime 119250
nfdivmodpr 0
nfkermodpr 0
nfmulmodpr 7
nfpowmodpr 0
nfsolvemodpr 0
nfweilheight 84
nfweilheight_i 84
not_in_ideal 14
ok_elt 229455
p_makecoprime 88854
prV_e_muls 27526
prV_lcm_capZ 81848
prV_primes 60500
pr_hnf 3605910
pr_inv 18256
pr_inv_p 39362
pr_uniformizer 57953
ramified_root 7257
ramified_root_simple 7
sunits_makecoprime 98
to_Fp_coprime 122428
to_famat 0
to_famat_shallow 2688370
trivial_merge 28
twistG 12625
u_ppo 53891797
vec_mulid 91
vecdiv 903
vecinv 770
vecmul 16009251
vecpow 0
vecsqr 185815
zk_pvalrem 4057082

Generated by: LCOV version 1.16