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-bordeaux1.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.8.0 lcov report (development 16912-212c0f0) Lines: 1144 1295 88.3 %
Date: 2014-10-20 Functions: 469 540 86.9 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 498 608 81.9 %

Function Name Sort by function name Hit count Sort by hit count
F2m_clear 0
F2m_coeff 13873643
F2m_copy 1400
F2m_flip 332706
F2m_set 2200727
F2v_clear 1846826
F2v_coeff 81723233
F2v_copy 0
F2v_ei 7
F2v_flip 332706
F2v_set 14436037
F2v_to_F2x 5691
F2x_clear 1846826
F2x_coeff 82317743
F2x_div 979852
F2x_equal 952986
F2x_equal1 1481
F2x_flip 332706
F2x_renormalize 51616729
F2x_set 32022583
Flm_copy 456424
Flv_copy 705878
Flx_copy 33633617
Flx_div 1208768
Flx_equal1 2715200
Flx_lead 63344
Flx_mulu 131587
FlxqX_div 4837
FlxqX_rem 58579
Flxq_add 0
Flxq_sub 0
FpV_FpC_mul 0
FpXQX_div 0
FpXQX_renormalize 523665
FpXQ_add 0
FpXQ_sub 0
FpXX_renormalize 457194
FpX_div 507395
FpX_renormalize 80464318
Fp_add 38308071
Fp_addmul 2327397
Fp_center 2585513
Fp_div 2308552
Fp_halve 15801
Fp_inv 4665485
Fp_invsafe 312915
Fp_mul 23322905
Fp_muls 231
Fp_mulu 24450370
Fp_neg 9178699
Fp_red 2796188
Fp_sqr 5377852
Fp_sub 51898187
FqXQ_add 0
FqXQ_div 16670
FqXQ_inv 0
FqXQ_invsafe 0
FqXQ_mul 105783
FqXQ_pow 0
FqXQ_sqr 38976
FqXQ_sub 0
FqX_Fp_mul 437514
FqX_Fq_mul 462675
FqX_add 763647
FqX_div 3185
FqX_div_by_X_x 0
FqX_divrem 0
FqX_extgcd 29439
FqX_gcd 10675
FqX_mul 75686
FqX_mulu 386446
FqX_neg 3972
FqX_powu 973
FqX_red 7665
FqX_rem 25080
FqX_sqr 4039
FqX_sub 102927
Fq_red 1236622
GENbinbase 42280592
QV_isscalar 5194069
Q_abs 231624
Q_abs_shallow 28238
RgC_fpnorml2 116284
RgC_gtofp 242669
RgC_gtomp 560
RgM_dimensions 113524
RgM_fpnorml2 546
RgM_gtofp 17389
RgM_gtomp 14
RgM_inv 27045
RgM_minor 198
RgM_shallowcopy 4579073
RgV_is_QV 0
RgV_is_ZV 1258648
RgV_isscalar 6230
RgXQX_div 0
RgXQX_rem 9842
RgXQ_mul 279572
RgXQ_sqr 137081
RgX_coeff 5411
RgX_copy 56834149
RgX_div 6051730
RgX_equal_var 781144
RgX_fpnorml2 8316
RgX_gtofp 375850
RgX_is_QX 5187
RgX_is_ZX 53472815
RgX_is_monomial 14687516
RgX_is_rational 630
RgX_isscalar 0
RgX_rem 1353157
RgX_renormalize 161497
RgX_shift_inplace 472247
RgX_shift_inplace_init 472247
Rg_col_ei 3086944
ZC_hnfrem 779428
ZM_hnfrem 25074
ZM_lll 1070339
ZV_dvd 23198
ZV_isscalar 1184805
ZV_to_zv 192820
ZXQ_mul 86394
ZXQ_sqr 13034
ZX_ZXY_resultant 0
ZX_equal1 12830
ZX_renormalize 68935655
Z_ispower 14
Z_issquare 230012
abgrp_get_cyc 866849
abgrp_get_gen 221234
abgrp_get_no 7798
absfrac 1078351
absfrac_shallow 7651
addmuliu 7000
addmuliu_inplace 232260272
affc_fixlg 26544
affgr 3172042
bid_get_arch 96699
bid_get_cyc 448062
bid_get_gen 4774
bid_get_gen_nocheck 0
bid_get_grp 453354
bid_get_ideal 69260
bid_get_mod 277232
bid_get_no 0
bin_copy 24665155
bit_accuracy 950964156
bit_accuracy_mul 2102591
bit_prec 20500762
bnf_get_clgp 452667
bnf_get_cyc 236095
bnf_get_fu 6160
bnf_get_fu_nocheck 11144
bnf_get_gen 215879
bnf_get_logfu 333548
bnf_get_nf 881345
bnf_get_no 553
bnf_get_reg 357
bnf_get_tuN 7098
bnf_get_tuU 5593
bnr_get_bid 166795
bnr_get_bnf 335347
bnr_get_clgp 190861
bnr_get_cyc 182174
bnr_get_gen 1379
bnr_get_gen_nocheck 63
bnr_get_mod 8953
bnr_get_nf 2093
bnr_get_no 7245
both_odd 42648798
cgetalloc 2265
cgetc 45636
cgiv 38379586
closure_arity 87575336
closure_codestr 76670543
closure_get_code 0
closure_get_data 76665047
closure_get_dbg 5633
closure_get_frame 1022
closure_get_oper 76670543
closure_get_text 11877
closure_is_variadic 10899832
col_ei 1083367
const_col 15150
const_vec 5388703
const_vecsmall 3048042
constant_term 17398217
cxcompotor 1127695
cxnorm 5281133
cxtofp 562998
cyclic_perm 0
dbllog2r 12744088
degpol 1243808971
divsBIL 2752376728
ellQp_get_p 245
ellQp_get_prec 84
ellQp_get_zero 336
ellR_get_prec 245
ellR_get_sign 549
ell_get_a1 1944175
ell_get_a2 1408039
ell_get_a3 1960961
ell_get_a4 2021376
ell_get_a6 2431664
ell_get_b2 1985451
ell_get_b4 432604
ell_get_b6 823887
ell_get_b8 687907
ell_get_c4 4689607
ell_get_c6 5049489
ell_get_disc 6273005
ell_get_j 880530
ell_get_type 6688490
ell_is_inf 20711121
ellff_get_a4a6 255990
ellff_get_field 576667
ellinf 397534
ellnf_get_nf 49035
equali1 158209968
equalim1 55397
err_get_compo 77
err_get_num 18119
gabsz 0
gaddgs 1380490
gaddz 23318
gal_get_den 1512
gal_get_e 42
gal_get_gen 875
gal_get_group 791
gal_get_invvdm 1512
gal_get_mod 1498
gal_get_orders 413
gal_get_p 924
gal_get_pol 868
gal_get_roots 1855
gcmpgs 9709
gdiventz 0
gdivsg 96015
gdivz 0
gen_I 120490
gener_Fq_local 385
gequalgs 5635
gerepileall 3637479
gerepilecoeffs 8
gerepilecopy 18474123
gerepilemany 35791
gerepileupto 362072066
gerepileuptoint 872587669
gerepileuptoleaf 195827073
gmaxsg 0
gminsg 0
gmodz 0
gmul2nz 0
gmulgs 2081528
gmulz 11673
gnegz 0
gshiftz 0
gsubgs 376795
gsubz 0
gtodouble 5030829
gtofp 6548835
gtomp 22400
gtos 28091020
gtou 0
gval 413
icopy_avma 680353985
idealpseudomin 139621
idealpseudomin_nonscalar 216181
idealred 138873
idealred_elt 308
identity_perm 63623
inf_get_sign 11184
is_bigint 109003907
is_const_t 540651885
is_extscalar_t 541628
is_intreal_t 500036
is_matvec_t 291114583
is_noncalc_t 49498119
is_pm1 707385038
is_rational_t 107616
is_recursive_t 1279810502
is_scalar_t 148519667
is_universal_constant 18112426
is_vec_t 713320
isint1 3984731
isintm1 0
isintzero 249272682
ismpzero 499959
isonstack 1468876665
killblock 678193
leading_term 57869287
leafcopy_avma 29543390
lgcols 19152968
lgpol 518053995
lincombii 13089330
matpascal 273
mkcol 594065
mkcol2 11557971
mkcol2s 0
mkcol3 40287
mkcol3s 0
mkcol4 0
mkcol4s 0
mkcol5 0
mkcolcopy 25182
mkcols 0
mkcomplex 2853615
mkerr 0
mkfrac 37220
mkfraccopy 1357176
mkintmod 360276
mkintmodu 3514
mkmat 183996
mkmat2 8551960
mkmat3 2996
mkmat4 0
mkmat5 0
mkmatcopy 5103
mkmoo 3409
mkoo 5651
mkpolmod 63127
mkqfi 158109
mkquad 42
mkrfrac 7
mkrfraccopy 14
mkvec 1621769
mkvec2 12480741
mkvec2copy 161279
mkvec2s 8641
mkvec3 19615276
mkvec3s 492492
mkvec4 3589093
mkvec4s 7
mkvec5 11528771
mkveccopy 32749
mkvecs 7
mkvecsmall 21417233
mkvecsmall2 83115806
mkvecsmall3 31522201
mkvecsmall4 405542
mkvecsmall5 110
mpcosz 0
mpexpz 0
mplogz 0
mpsinz 0
mul_content 194390
mul_denom 154806
mulsubii 1274464
nbits2extraprec 207671921
nbits2lg 2359229
nbits2nlong 737906
nbits2prec 66051669
nbrows 11107020
nchar2nlong 8380346
ndec2nlong 12397
ndec2prec 12397
nf_get_G 34764
nf_get_M 838691
nf_get_Tr 791
nf_get_degree 2358470
nf_get_diff 784
nf_get_disc 17192
nf_get_index 410116
nf_get_invzk 989252
nf_get_pol 5130105
nf_get_r1 906162
nf_get_r2 259
nf_get_roots 37487
nf_get_roundG 317778
nf_get_sign 3507
nf_get_varn 3185
nf_get_zk 5272739
normalize_frac 3887246
odd 153731421
pari_calloc 20009
pari_err_BUG 10
pari_err_COMPONENT 203
pari_err_CONSTPOL 7
pari_err_COPRIME 42
pari_err_DIM 179
pari_err_DOMAIN 1206
pari_err_FILE 0
pari_err_FLAG 7
pari_err_IMPL 112
pari_err_INV 644
pari_err_IRREDPOL 14
pari_err_MAXPRIME 0
pari_err_MODULUS 707
pari_err_OP 308
pari_err_OVERFLOW 56
pari_err_PACKAGE 0
pari_err_PREC 225
pari_err_PRIME 35
pari_err_PRIORITY 63
pari_err_ROOTS0 35
pari_err_SQRTN 70
pari_err_TYPE 10077
pari_err_TYPE2 2786
pari_err_VAR 490
pari_free 32526769
pari_malloc 73767474
pari_realloc 57964
pari_stack_alloc 211277006
pari_stack_base 211300311
pari_stack_delete 18391
pari_stack_init 23711
pari_stack_new 184916889
pari_stack_pushp 4914
perm_conj 35
perm_inv 56
perm_mul 17716575
pol0_F2x 1749150
pol0_Flx 19846616
pol1_F2x 510380
pol1_Flx 8895675
pol_0 10482729
pol_1 574506
pol_x 275405
polx_F2x 172454
polx_Flx 5209783
polx_zx 0
powIs 812
powii 294477
pr_get_e 1112961
pr_get_f 3562184
pr_get_gen 1638719
pr_get_p 5029646
pr_get_tau 2189403
pr_is_inert 465449
pr_norm 69403
prec2nbits 40410714
prec2nbits_mul 47689
prec2ndec 3662
precdbl 1744
qfb_disc 3716167
qfb_disc3 3786454
quad_disc 175
quadnorm 623
remsBIL 2682890059
resultant 24507
rnf_get_absdegree 182
rnf_get_degree 917
rnf_get_disc 140
rnf_get_index 105
rnf_get_invzk 1057
rnf_get_map 1344
rnf_get_nf 4942
rnf_get_nfdegree 539
rnf_get_nfpol 4634
rnf_get_nfvarn 56
rnf_get_nfzk 735
rnf_get_pol 7077
rnf_get_polabs 1820
rnf_get_varn 0
rnf_get_zk 1925
row 113642
row_Flm 24244
row_i 1953
row_zm 0
rowcopy 21
rowpermute 130286
rowslice 91746
rowslicepermute 18238
ser_isexactzero 606142
shallowcopy 184323
sqrfrac 123235
sqrti 2436854
sqrtnr 26860
sqrtr 6173378
sturm 0
submulii 35198033
submuliu 7000
submuliu_inplace 232554521
truecoeff 0
trunc_safe 0
vec_append 54894
vec_ei 296379
vec_lengthen 7574
vec_setconst 1687
vec_shorten 0
vec_to_vecsmall 200520
vecpermute 4167337
vecreverse 1105
vecreverse_inplace 218
vecslice 1598919
vecslicepermute 81136
vecsmall_append 353290
vecsmall_coincidence 0
vecsmall_concat 192290
vecsmall_copy 21912153
vecsmall_ei 7140
vecsmall_indexmax 14
vecsmall_indexmin 14
vecsmall_isin 0
vecsmall_lengthen 448
vecsmall_lexcmp 2586374
vecsmall_max 1638
vecsmall_min 0
vecsmall_pack 84
vecsmall_prefixcmp 35286195
vecsmall_prepend 742
vecsmall_shorten 4466
vecsmall_to_col 412829
vecsmall_to_vec 5452
vecsmallpermute 17409723
vecsmalltrunc_append 2182624
vecsmalltrunc_init 1173111
vecsplice 3419
vectrunc_append 781602
vectrunc_append_batch 0
vectrunc_init 532465
zc_to_ZC 394279
zero_F2m 0
zero_F2m_copy 92144
zero_F2v 731254
zero_F2x 77
zero_Flm 133
zero_Flm_copy 11536
zero_Flv 17954659
zero_Flx 44633
zero_zm 0
zero_zv 12500487
zero_zx 0
zerocol 18777341
zeromat 5159
zeromatcopy 1790011
zeropadic 10780
zeropadic_shallow 303
zeropol 3970553
zeroser 6062
zerovec 5103490
zm_copy 0
zm_to_zxV 0
zm_transpose 91
zv_copy 540142
zv_to_ZV 4263
zv_to_zx 0
zx_renormalize 0
zx_shift 0
zx_to_zv 0

Generated by: LCOV version 1.9