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 29877-9124a6ce27) Lines: 1697 1846 91.9 %
Date: 2025-01-18 09:08:44 Functions: 170 185 91.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Z_dcba_rec 0
Z_ppgle 0
ext_pow 0
famat_Z_gcd 0
famat_idealfactor 0
famat_to_nf 0
idealHNF_Z_factor 0
idealapprfact 0
idealpseudomin_nonscalar 0
nfdivmodpr 0
nfkermodpr 0
nfpowmodpr 0
nfsolvemodpr 0
to_famat 0
vecpow 0
err_divexact 7
hnf_QC_QC 7
idealmin 7
nfmulmodpr 7
ramified_root_simple 7
idealappr 14
idealappr0 14
not_in_ideal 14
chk_vdir 21
hnf_Q_Q 21
idealintersect 21
idealismaximal_mat 21
mat_ideal_two_elt2 21
ZV_cba 28
in_ideal 28
trivial_merge 28
idealaddmultoone 35
idealismaximal_int 42
idealtwoelt2 42
ZV_cba_extend 49
idealdiv0 56
matreduce 63
hnf_Z_QC 70
idealaddtoone0 70
idealmul0 70
hnf_Q_QC 77
hnf_Z_ZC 77
idealismaximal 77
idealismaximal_i 77
idealcoprime 84
nfV_eltembed 84
nfV_idealhnf 84
nfweilheight 84
nfweilheight_i 84
isideal 91
vec_mulid 91
idealaddtoone 98
sunits_makecoprime 98
nf_coprime_part 126
gpidealfactor 182
idealhnf0 413
idealprodprime 525
idealhnf 595
famat_to_Fp_coprime 693
idealprod 826
vecinv 826
vecdiv 903
idealprodval 1819
idealtwoelt0 2485
idealpow0 2499
idealdown 3038
idealispower 3926
idealdivexact 5034
gpidealval 7119
ramified_root 7789
idealsqrtn_int 7796
famat_div_shallow 10304
make_integral 10920
_mul 11363
idealdivpowprime 11971
nf_get_Gtwist1 12597
twistG 12639
famatV_factorback 13765
idealred_elt 13808
idealmulred 17207
idealaddtoone_i 17605
pr_inv 17821
famat_to_nf_moddivisor 20118
ext_inv 20406
famat_sub 20937
famat_sqr 22915
idealfactor_partial 25508
famat_inv_shallow 26969
Q_nffactor 28177
prV_e_muls 28187
_idealmulred 28570
ext_sqr 33863
_idealsqrred 35648
_sqr 35648
idealcoprimefact 37212
pr_inv_p 38397
idealsqr 38896
idealsqr_aux 38896
idealdiv 39316
famatV_zv_factorback 46751
idealredmodpower 49167
famat_remove_trivial 53791
idealapprfact_i 54037
pr_uniformizer 58169
famat_pow 60642
ext_mul 60748
prV_primes 61075
factorbackprime 61534
famat_pow_shallow 62035
addmul_mat 65279
idealHNF_inv 68392
idealpowred 80261
idealadd 81609
prV_lcm_capZ 81995
famat_mulpow_shallow 88308
p_makecoprime 94862
idealtwoelt 96818
RM_round_maxrank 97411
idealredmodpower_i 98320
idealnorm 104631
idealinv 114133
get_random_a 117236
famat_mulpows_shallow 118547
nf_to_Fp_coprime 120162
famat_pows_shallow 123141
to_Fp_coprime 123340
idealred0 138645
nf_get_Gtwist 138652
idealpseudomin 142933
append 151930
famat_add 158601
famatsmall_reduce 176592
vecsqr 185983
Q_to_famat 197145
famat_inv 199362
famat_div 200154
famat_mul_shallow 200583
idealHNF_inv_Z 210479
ok_elt 223369
idealHNF_factor 239921
mat_ideal_two_elt 249753
idealmulelt 264958
idealfactor 267828
idealfactor_limit 268221
idealpows 274611
idealsqrprime 285648
idealHNF_Z_factor_i 285670
idealHNF_factor_i 285671
famat_reduce 295921
Z_to_famat 376355
idealnumden 379555
Z_cba 413000
famat_mul 447421
idealHNF_mul 469903
idealmul 506109
idealmul_aux 506110
Z_ppio 532903
ZM_famat_limit 568191
idealaddtoone_raw 713504
_idealaddtoone 731110
idealhnf_two 738543
idealmulpowprime 767395
idealpow 888539
idealpow_aux 888542
idealHNF_mul_two 922905
idealpowprime 1196276
idealpseudominvec 1204363
idealpseudored 1285445
idealhnf_principal 1309400
lcmuu 1588380
idealhnf_shallow 1720841
famat_makecoprime 2003842
to_famat_shallow 2688547
pr_hnf 3580358
Z_cba_rec 3766434
idealHNF_norm_pval 4043438
zk_pvalrem 4094733
nf_remove_denom_p 4140562
idealHNF_val 4178983
Fl_invgen 5711867
idealval 9397745
idealtyp 15840749
vecmul 15998834
Z_ppo 18157181
u_ppo 54219546

Generated by: LCOV version 1.16