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 29420-55f63b8cfe) Lines: 1684 1837 91.7 %
Date: 2024-07-03 09:03:24 Functions: 170 185 91.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_invgen 5555780
Q_nffactor 26898
Q_to_famat 197053
RM_round_maxrank 96368
ZM_famat_limit 568116
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 19910879
Z_to_famat 376251
_idealaddtoone 731760
_idealmulred 28589
_idealsqrred 35676
_mul 11382
_sqr 35676
addmul_mat 67431
append 151946
chk_vdir 21
err_divexact 7
ext_inv 20368
ext_mul 60758
ext_pow 0
ext_sqr 33891
factorbackprime 57565
famatV_factorback 13759
famatV_zv_factorback 46528
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 2003507
famat_mul 447356
famat_mul_shallow 199532
famat_mulpow_shallow 88316
famat_mulpows_shallow 117984
famat_pow 60642
famat_pow_shallow 62037
famat_pows_shallow 122844
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 121849
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 284527
idealHNF_factor 239088
idealHNF_factor_i 284523
idealHNF_inv 78908
idealHNF_inv_Z 217563
idealHNF_mul 388690
idealHNF_mul_two 799776
idealHNF_norm_pval 3990814
idealHNF_val 4127032
idealadd 108265
idealaddmultoone 35
idealaddtoone 98
idealaddtoone0 70
idealaddtoone_i 19768
idealaddtoone_raw 711993
idealappr 14
idealappr0 14
idealapprfact 0
idealapprfact_i 53890
idealcoprime 84
idealcoprimefact 37204
idealdiv 39792
idealdiv0 56
idealdivexact 4404
idealdivpowprime 9997
idealdown 2982
idealfactor 265716
idealfactor_limit 266096
idealfactor_partial 25424
idealhnf 308
idealhnf0 217
idealhnf_principal 1366632
idealhnf_shallow 1743761
idealhnf_two 683238
idealintersect 21
idealinv 149137
idealismaximal 70
idealismaximal_i 70
idealismaximal_int 35
idealismaximal_mat 21
idealispower 3660
idealmin 7
idealmul 575322
idealmul0 70
idealmul_aux 575322
idealmulelt 304682
idealmulpowprime 729927
idealmulred 17207
idealnorm 99885
idealnumden 377907
idealpow 825414
idealpow0 84
idealpow_aux 825414
idealpowprime 1104798
idealpowred 80202
idealpows 274585
idealprod 462
idealprodprime 336
idealprodval 2806
idealpseudomin 139964
idealpseudomin_nonscalar 0
idealpseudominvec 1204395
idealpseudored 1284120
idealred0 138598
idealred_elt 10886
idealredmodpower 48619
idealredmodpower_i 97230
idealsqr 38560
idealsqr_aux 38560
idealsqrprime 281922
idealsqrtn_int 7264
idealtwoelt 102867
idealtwoelt0 70
idealtwoelt2 42
idealtyp 16075546
idealval 9470706
in_ideal 28
isideal 91
lcmuu 1508584
make_integral 10920
mat_ideal_two_elt 257755
mat_ideal_two_elt2 21
matreduce 63
nfV_eltembed 84
nfV_idealhnf 84
nf_coprime_part 126
nf_get_Gtwist 138605
nf_get_Gtwist1 12583
nf_remove_denom_p 4102892
nf_to_Fp_coprime 119252
nfdivmodpr 0
nfkermodpr 0
nfmulmodpr 7
nfpowmodpr 0
nfsolvemodpr 0
nfweilheight 84
nfweilheight_i 84
not_in_ideal 14
ok_elt 229501
p_makecoprime 88855
prV_e_muls 27494
prV_lcm_capZ 81848
prV_primes 60501
pr_hnf 3605912
pr_inv 18257
pr_inv_p 39361
pr_uniformizer 57953
ramified_root 7257
ramified_root_simple 7
sunits_makecoprime 98
to_Fp_coprime 122430
to_famat 0
to_famat_shallow 2688368
trivial_merge 28
twistG 12625
u_ppo 53891856
vec_mulid 91
vecdiv 903
vecinv 770
vecmul 15990035
vecpow 0
vecsqr 193473
zk_pvalrem 4057068

Generated by: LCOV version 1.16