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 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 - headers - pariinl.h (source / functions) Hit Total Coverage
Test: PARI/GP v2.10.0 lcov report (development 20291-5fbfea9) Lines: 1218 1389 87.7 %
Date: 2017-02-25 05:49:34 Functions: 520 592 87.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
F2m_clear 0
F2m_coeff 13030394
F2m_copy 1740
F2m_flip 1339120
F2m_set 1668085
F2v_clear 3579184
F2v_coeff 102930535
F2v_copy 0
F2v_ei 7
F2v_flip 1339120
F2v_set 15795216
F2v_to_F2x 7187
F2x_clear 3579184
F2x_coeff 106663389
F2x_copy 66261706
F2x_div 2859693
F2x_equal 3335009
F2x_equal1 790510
F2x_flip 1339120
F2x_renormalize 126267620
F2x_set 40274507
F2xqX_div 29785
Flm_copy 865009
Flm_row 25521
Flv_copy 2274645
Flx_copy 74337733
Flx_div 3082591
Flx_equal1 4642866
Flx_lead 407045
Flx_mulu 665925
FlxqX_div 31477
Flxq_add 0
Flxq_sub 110
FpV_FpC_mul 0
FpXQX_div 954
FpXQX_renormalize 988382
FpXQ_add 0
FpXQ_sub 0
FpXX_renormalize 949192
FpX_div 745299
FpX_renormalize 87150297
Fp_add 60083533
Fp_addmul 1507863
Fp_center 5071723
Fp_div 4584953
Fp_halve 19786
Fp_inv 7572523
Fp_invsafe 290489
Fp_mul 47981413
Fp_muls 0
Fp_mulu 43525102
Fp_neg 10714319
Fp_red 1723287
Fp_sqr 6937008
Fp_sub 45800922
FqXQ_add 0
FqXQ_div 0
FqXQ_inv 0
FqXQ_invsafe 0
FqXQ_mul 21018
FqXQ_pow 0
FqXQ_sqr 0
FqXQ_sub 0
FqX_Fp_mul 608016
FqX_Fq_mul 552791
FqX_add 903963
FqX_deriv 268604
FqX_div 2977
FqX_div_by_X_x 5957
FqX_divrem 329
FqX_extgcd 79527
FqX_factor 71141
FqX_gcd 254102
FqX_get_red 5605
FqX_halfgcd 0
FqX_mul 83735
FqX_mulu 459889
FqX_neg 16438
FqX_normalize 1995
FqX_powu 1428
FqX_red 27419
FqX_rem 47875
FqX_roots 5810
FqX_sqr 4760
FqX_sub 2380
Fq_red 1299940
Fq_to_FpXQ 11793
GENbinbase 75466069
QV_isscalar 6122128
Q_abs 550921
Q_abs_shallow 31799
R_abs 0
R_abs_shallow 322
RgC_fpnorml2 132616
RgC_gtofp 264786
RgC_gtomp 560
RgM_dimensions 107510
RgM_fpnorml2 1563
RgM_gtofp 18838
RgM_gtomp 14
RgM_inv 24481
RgM_minor 756
RgM_shallowcopy 7886041
RgV_gtofp 42
RgV_is_QV 147
RgV_is_ZV 2496310
RgV_isscalar 3696
RgXQX_div 7
RgXQX_rem 17192
RgXQ_mul 478687
RgXQ_sqr 242127
RgX_coeff 2225280
RgX_copy 64088313
RgX_div 6366390
RgX_equal_var 3979752
RgX_fpnorml2 7232
RgX_gtofp 484722
RgX_is_QX 161269
RgX_is_ZX 55806482
RgX_is_monomial 15529130
RgX_is_rational 2577
RgX_isscalar 0
RgX_rem 2541891
RgX_renormalize 316001
RgX_shift_inplace 586414
RgX_shift_inplace_init 586413
Rg_col_ei 2788078
ZC_hnfrem 784760
ZM_hnfrem 23454
ZM_lll 1230009
ZV_dvd 23198
ZV_isscalar 2012128
ZV_to_zv 221954
ZXQ_mul 117698
ZXQ_sqr 20972
ZX_ZXY_resultant 0
ZX_equal1 18056
ZX_renormalize 73915508
Z_ispower 14
Z_issquare 1969420
abgrp_get_cyc 1231327
abgrp_get_gen 302921
abgrp_get_no 9527
absfrac 1823820
absfrac_shallow 10909
addmuliu 7000
addmuliu_inplace 109014313
affc_fixlg 186595
affgr 180482
bid_get_U 455376
bid_get_arch 448
bid_get_archp 235108
bid_get_cyc 666859
bid_get_fact 238881
bid_get_fact2 231321
bid_get_gen 7406
bid_get_gen_nocheck 0
bid_get_grp 674860
bid_get_ideal 11697
bid_get_mod 223775
bid_get_no 0
bid_get_sarch 6447
bid_get_sprk 231391
bin_copy 37734301
bit_accuracy 1100714780
bit_accuracy_mul 453973
bit_prec 23755851
bnf_get_clgp 620878
bnf_get_cyc 325461
bnf_get_fu 1806
bnf_get_fu_nocheck 3802
bnf_get_gen 293954
bnf_get_logfu 476634
bnf_get_nf 1374621
bnf_get_no 1134
bnf_get_reg 860
bnf_get_tuN 7672
bnf_get_tuU 2535
bnr_get_bid 218217
bnr_get_bnf 440921
bnr_get_clgp 259937
bnr_get_cyc 237026
bnr_get_gen 13622
bnr_get_gen_nocheck 70
bnr_get_mod 24563
bnr_get_nf 13398
bnr_get_no 8393
both_odd 7442279
cbrtr 0
cbrtr_abs 0
cgetalloc 3905
cgetc 204133
cgiv 26909036
closure_arity 186794197
closure_codestr 152188307
closure_get_code 0
closure_get_data 152128373
closure_get_dbg 16967
closure_get_frame 429843
closure_get_oper 152144759
closure_get_text 37483
closure_is_variadic 34377851
col_ei 1295711
const_col 32245
const_vec 9133432
const_vecsmall 4963084
constant_coeff 17561122
cxcompotor 2144176
cxnorm 8747320
cxtofp 1070333
cyclic_perm 0
dbllog2r 17019398
degpol 2436860185
divsBIL 2876066304
ellQp_get_p 623
ellQp_get_prec 287
ellQp_get_zero 917
ellR_get_prec 36946
ellR_get_sign 1507
ell_get_a1 5005305
ell_get_a2 3297288
ell_get_a3 4477946
ell_get_a4 4095008
ell_get_a6 4668868
ell_get_b2 3949782
ell_get_b4 1009835
ell_get_b6 1613683
ell_get_b8 1457449
ell_get_c4 6102760
ell_get_c6 8134420
ell_get_disc 9563316
ell_get_j 1174656
ell_get_type 7854650
ell_is_inf 25058898
ellff_get_a4a6 652832
ellff_get_field 1511453
ellinf 806482
ellnf_get_bnf 42
ellnf_get_nf 505771
equali1 217190377
equalim1 23549439
err_get_compo 70
err_get_num 47481
gabsz 0
gaddgs 7464318
gaddz 23318
gal_get_den 2142
gal_get_e 63
gal_get_gen 1862
gal_get_group 7196
gal_get_invvdm 2142
gal_get_mod 2142
gal_get_orders 1407
gal_get_p 1225
gal_get_pol 2891
gal_get_roots 2520
gcmpgs 23890
gdiventz 0
gdivsg 450875
gdivz 0
gen_I 424680
gener_Fq_local 833
gequalgs 22827
gerepileall 4916436
gerepilecoeffs 8
gerepilecopy 33476463
gerepilemany 64813
gerepileupto 633472196
gerepileuptoint 923017201
gerepileuptoleaf 512631029
gmaxsg 0
gminsg 0
gmodz 0
gmul2nz 0
gmulgs 5793991
gmulz 11673
gnegz 0
gshiftz 0
gsubgs 554848
gsubz 0
gtodouble 21241298
gtofp 17620446
gtomp 22400
gtos 66520425
gtou 83104
gval 2205
icopy_avma 3664577521
idealchineseinit 1218
idealpseudomin 150960
idealpseudomin_nonscalar 268481
idealpseudored 5124
idealred 155953
idealred_elt 0
identity_perm 74216
inf_get_sign 29062
is_bigint 125922783
is_const_t 1079069818
is_extscalar_t 45205
is_intreal_t 928229
is_matvec_t 357650521
is_noncalc_t 51718891
is_pm1 1399840845
is_rational_t 585149
is_real_t 299211
is_recursive_t 2539022656
is_scalar_t 159661724
is_universal_constant 16915969
is_vec_t 472270
isint1 6919920
isintm1 301
isintzero 358753407
ismpzero 928152
isonstack 2096066060
killblock 1174793
leading_coeff 73533945
leafcopy_avma 93637849
lgcols 59783433
lgpol 1285880333
lincombii 26127466
logint 398803
matpascal 1008
matslice 114555
mkcol 2083477
mkcol2 14740535
mkcol2s 1181376
mkcol3 41615
mkcol3s 0
mkcol4 0
mkcol4s 0
mkcol5 0
mkcol6 764
mkcolcopy 22255
mkcols 728
mkcomplex 2861785
mkerr 0
mkfrac 1798330
mkfraccopy 2874328
mkintmod 332305
mkintmodu 3780
mkmat 693525
mkmat2 15700446
mkmat3 2352
mkmat4 0
mkmat5 0
mkmatcopy 7229
mkmoo 7874
mkoo 14135
mkpolmod 287403
mkqfi 158123
mkquad 42
mkrfrac 5019
mkrfraccopy 14
mkvec 3131462
mkvec2 22549738
mkvec2copy 184881
mkvec2s 12047
mkvec3 51221988
mkvec3s 492702
mkvec4 7338432
mkvec4s 0
mkvec5 11754822
mkveccopy 33355
mkvecs 7
mkvecsmall 49501213
mkvecsmall2 110065625
mkvecsmall3 61644392
mkvecsmall4 9289356
mkvecsmall5 435711
modpr_get_T 1790204
modpr_get_p 602621
modpr_get_pr 6241197
mpcosz 0
mpexpz 0
mplogz 0
mpsinz 0
mul_content 212951
mul_denom 435763
mulsubii 2249125
nbits2extraprec 240316780
nbits2lg 3309746
nbits2ndec 179
nbits2nlong 1005773
nbits2prec 74955089
nbrows 14398884
nchar2nlong 6927229
ndec2nbits 462
ndec2nlong 23049
ndec2prec 22587
nf_get_G 45483
nf_get_M 1110033
nf_get_Tr 819
nf_get_degree 2715508
nf_get_diff 1729
nf_get_disc 23897
nf_get_index 625010
nf_get_invzk 1649304
nf_get_pol 6687410
nf_get_r1 1159435
nf_get_r2 1267
nf_get_ramified_primes 35
nf_get_roots 100142
nf_get_roundG 394652
nf_get_sign 6720
nf_get_varn 4402
nf_get_zk 6408990
normalize_frac 8303387
odd 1319419857
pari_calloc 30343
pari_err_BUG 14
pari_err_COMPONENT 224
pari_err_CONSTPOL 7
pari_err_COPRIME 63
pari_err_DIM 932
pari_err_DOMAIN 5201
pari_err_FILE 0
pari_err_FLAG 28
pari_err_IMPL 350
pari_err_INV 627
pari_err_IRREDPOL 21
pari_err_MAXPRIME 0
pari_err_MODULUS 735
pari_err_OP 287
pari_err_OVERFLOW 70
pari_err_PACKAGE 0
pari_err_PREC 218
pari_err_PRIME 56
pari_err_PRIORITY 119
pari_err_ROOTS0 42
pari_err_SQRTN 77
pari_err_TYPE 18976
pari_err_TYPE2 3073
pari_err_VAR 203
pari_free 46042505
pari_malloc 183543337
pari_realloc 315013
pari_stack_alloc 329874146
pari_stack_base 330741492
pari_stack_delete 778761
pari_stack_init 897853
pari_stack_new 276403604
pari_stack_pushp 5831
perm_conj 204981
perm_inv 6356
perm_mul 21353060
pol0_F2x 10871879
pol0_Flx 43489895
pol1_F2x 2644650
pol1_Flx 17472888
pol_0 13780074
pol_1 1189715
pol_x 685662
pol_xn 2510702
pol_xnall 133
polx_F2x 655697
polx_Flx 16766378
polx_zx 0
powIs 840
powii 211571
pr_get_e 2041318
pr_get_f 6044842
pr_get_gen 2160579
pr_get_p 14772743
pr_get_tau 5784170
pr_is_inert 768002
pr_norm 293309
prec2nbits 1179864773
prec2nbits_mul 229912
prec2ndec 12134
precdbl 1650
qfb_disc 5915000
qfb_disc3 6006336
quad_disc 252
quadnorm 623
remsBIL 2811363121
resultant 34982
rnf_get_absdegree 156450
rnf_get_alpha 448
rnf_get_degree 311276
rnf_get_disc 63
rnf_get_idealdisc 434
rnf_get_index 105
rnf_get_invzk 1190
rnf_get_k 448
rnf_get_map 34006
rnf_get_nf 123767
rnf_get_nfdegree 14805
rnf_get_nfpol 106519
rnf_get_nfvarn 483
rnf_get_nfzk 1701
rnf_get_pol 462973
rnf_get_polabs 93674
rnf_get_varn 0
rnf_get_zk 2443
row 169578
row_i 2177
rowcopy 56
rowpermute 86549
rowslice 239356
rowslicepermute 35210
rowsplice 133
ser_isexactzero 4025218
shallowcopy 2273271
sqrfrac 1409229
sqrti 4655864
sqrtnr 290816
sqrtr 15713206
sturm 448
submulii 13414807
submuliu 7000
submuliu_inplace 110361807
truecoeff 0
trunc_safe 0
upr_norm 32277
vec_append 56308
vec_ei 304249
vec_lengthen 10577
vec_setconst 0
vec_shorten 0
vec_to_vecsmall 232853
vecpermute 4357097
vecreverse 4744860
vecreverse_inplace 232
vecslice 3766222
vecslicepermute 140628
vecsmall_append 371716
vecsmall_coincidence 0
vecsmall_concat 243316
vecsmall_copy 1624669
vecsmall_ei 40345
vecsmall_indexmax 14
vecsmall_indexmin 14
vecsmall_isin 0
vecsmall_lengthen 21
vecsmall_lexcmp 8165890
vecsmall_max 40555
vecsmall_min 0
vecsmall_pack 84
vecsmall_prefixcmp 47066978
vecsmall_prepend 1491
vecsmall_reverse 252
vecsmall_shorten 129898
vecsmall_to_col 1269837
vecsmall_to_vec 21357
vecsmall_to_vec_inplace 896
vecsmallpermute 20074979
vecsmalltrunc_append 2864024
vecsmalltrunc_init 1399511
vecsplice 8365
vectrunc_append 42966414
vectrunc_append_batch 0
vectrunc_init 11518667
zc_to_ZC 1232828
zero_F2m 0
zero_F2m_copy 269987
zero_F2v 746753
zero_F2x 35
zero_Flm 287
zero_Flm_copy 74556
zero_Flv 29333917
zero_Flx 784749
zero_zm 0
zero_zv 16303131
zero_zx 0
zerocol 21765896
zeromat 4725
zeromatcopy 1919341
zeropadic 300979
zeropadic_shallow 504
zeropol 5109302
zeroser 14091
zerovec 7785759
zerovec_block 15771
zm_copy 0
zm_row 0
zm_to_zxV 0
zm_transpose 168
znstar_get_N 19152
znstar_get_U 6902
znstar_get_Ui 161
znstar_get_conreycyc 17213
znstar_get_conreygen 13335
znstar_get_cyc 567
znstar_get_faN 34545
znstar_get_gen 0
znstar_get_no 0
znstar_get_pe 13321
zv_copy 1975535
zv_to_ZV 18207
zv_to_zx 0
zx_renormalize 0
zx_shift 0
zx_to_zv 0

Generated by: LCOV version 1.11