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 17953-c39f2e6) Lines: 1169 1317 88.8 %
Date: 2015-08-31 Functions: 484 551 87.8 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 515 620 83.1 %

Function Name Sort by function name Hit count Sort by hit count
F2m_clear 0
F2m_coeff 11755424
F2m_copy 1449
F2m_flip 338529
F2m_set 1549002
F2v_clear 2115586
F2v_coeff 95744876
F2v_copy 0
F2v_ei 7
F2v_flip 338529
F2v_set 13121792
F2v_to_F2x 6027
F2x_clear 2115586
F2x_coeff 98347415
F2x_div 1135442
F2x_equal 1179874
F2x_equal1 150411
F2x_flip 338529
F2x_renormalize 56520217
F2x_set 32435533
Flm_copy 474163
Flm_row 28560
Flv_copy 1340268
Flx_copy 49452598
Flx_div 1430398
Flx_equal1 3782141
Flx_lead 401372
Flx_mulu 314413
FlxqX_div 6146
FlxqX_rem 161206
Flxq_add 0
Flxq_sub 0
FpV_FpC_mul 0
FpXQX_div 0
FpXQX_renormalize 857045
FpXQ_add 0
FpXQ_sub 0
FpXX_renormalize 913179
FpX_div 519062
FpX_renormalize 93597266
Fp_add 174121429
Fp_addmul 2438076
Fp_center 4394600
Fp_div 4663610
Fp_halve 22608
Fp_inv 7895574
Fp_invsafe 350048
Fp_mul 148947456
Fp_muls 231
Fp_mulu 61092962
Fp_neg 9899040
Fp_red 3411035
Fp_sqr 6435386
Fp_sub 62678806
FqXQ_add 0
FqXQ_div 23432
FqXQ_inv 0
FqXQ_invsafe 0
FqXQ_mul 144787
FqXQ_pow 0
FqXQ_sqr 55020
FqXQ_sub 0
FqX_Fp_mul 539461
FqX_Fq_mul 554817
FqX_add 901895
FqX_div 9597
FqX_div_by_X_x 5831
FqX_divrem 0
FqX_extgcd 37352
FqX_gcd 40754
FqX_mul 101444
FqX_mulu 463210
FqX_neg 5848
FqX_powu 1554
FqX_red 10094
FqX_rem 38572
FqX_sqr 6510
FqX_sub 142484
Fq_red 1544042
Fq_to_FpXQ 5294
GENbinbase 56036650
QV_isscalar 5463450
Q_abs 313194
Q_abs_shallow 37855
RgC_fpnorml2 242522
RgC_gtofp 379589
RgC_gtomp 560
RgM_dimensions 115543
RgM_fpnorml2 1505
RgM_gtofp 18962
RgM_gtomp 14
RgM_inv 29923
RgM_minor 504
RgM_shallowcopy 4842734
RgV_is_QV 0
RgV_is_ZV 1461453
RgV_isscalar 6392
RgXQX_div 7
RgXQX_rem 31668
RgXQ_mul 403269
RgXQ_sqr 218212
RgX_coeff 362295
RgX_copy 62248421
RgX_div 6058011
RgX_equal_var 4076807
RgX_fpnorml2 10225
RgX_gtofp 448602
RgX_is_QX 109354
RgX_is_ZX 56367171
RgX_is_monomial 14717207
RgX_is_rational 2429
RgX_isscalar 0
RgX_rem 2612835
RgX_renormalize 307097
RgX_shift_inplace 545786
RgX_shift_inplace_init 545782
Rg_col_ei 3276350
ZC_hnfrem 801690
ZM_hnfrem 26813
ZM_lll 1132827
ZV_dvd 23198
ZV_isscalar 1566280
ZV_to_zv 193653
ZXQ_mul 104657
ZXQ_sqr 17654
ZX_ZXY_resultant 0
ZX_equal1 12675
ZX_renormalize 79726857
Z_ispower 14
Z_issquare 662784
abgrp_get_cyc 892447
abgrp_get_gen 227589
abgrp_get_no 8008
absfrac 1330355
absfrac_shallow 11564
addmuliu 7000
addmuliu_inplace 264441394
affc_fixlg 175414
affgr 176947
bid_get_arch 98487
bid_get_cyc 461405
bid_get_gen 4991
bid_get_gen_nocheck 0
bid_get_grp 466914
bid_get_ideal 72892
bid_get_mod 287300
bid_get_no 0
bin_copy 28019308
bit_accuracy 1123947236
bit_accuracy_mul 2501845
bit_prec 24358125
bnf_get_clgp 465258
bnf_get_cyc 242548
bnf_get_fu 6740
bnf_get_fu_nocheck 12074
bnf_get_gen 222010
bnf_get_logfu 347077
bnf_get_nf 927969
bnf_get_no 560
bnf_get_reg 601
bnf_get_tuN 7567
bnf_get_tuU 6034
bnr_get_bid 172107
bnr_get_bnf 346048
bnr_get_clgp 196894
bnr_get_cyc 187976
bnr_get_gen 1400
bnr_get_gen_nocheck 70
bnr_get_mod 9170
bnr_get_nf 2219
bnr_get_no 7448
both_odd 16136722
cbrtr 11355
cgetalloc 4751
cgetc 181551
cgiv 43113258
closure_arity 182858531
closure_codestr 151855235
closure_get_code 0
closure_get_data 151747868
closure_get_dbg 58148
closure_get_frame 83260
closure_get_oper 151805477
closure_get_text 118228
closure_is_variadic 31033984
col_ei 1167987
const_col 19787
const_vec 6151464
const_vecsmall 3231542
constant_term 17429028
cxcompotor 1611111
cxnorm 6686872
cxtofp 804440
cyclic_perm 0
dbllog2r 20811650
degpol 1754649090
divsBIL 3414285984
ellQp_get_p 245
ellQp_get_prec 84
ellQp_get_zero 336
ellR_get_prec 574
ellR_get_sign 688
ell_get_a1 1998963
ell_get_a2 1416342
ell_get_a3 2014562
ell_get_a4 2030759
ell_get_a6 2440784
ell_get_b2 2034251
ell_get_b4 446209
ell_get_b6 837789
ell_get_b8 689332
ell_get_c4 4726847
ell_get_c6 5086381
ell_get_disc 6414678
ell_get_j 948640
ell_get_type 6892836
ell_is_inf 16309339
ellff_get_a4a6 313284
ellff_get_field 794140
ellinf 406261
ellnf_get_nf 52885
equali1 188257135
equalim1 21075046
err_get_compo 77
err_get_num 130137
gabsz 0
gaddgs 7030656
gaddz 23318
gal_get_den 1631
gal_get_e 42
gal_get_gen 875
gal_get_group 840
gal_get_invvdm 1631
gal_get_mod 1617
gal_get_orders 413
gal_get_p 924
gal_get_pol 917
gal_get_roots 1974
gcmpgs 21104
gdiventz 0
gdivsg 150506
gdivz 0
gen_I 411264
gener_Fq_local 462
gequalgs 22911
gerepileall 4302269
gerepilecoeffs 8
gerepilecopy 21683293
gerepilemany 37731
gerepileupto 478689856
gerepileuptoint 1116551101
gerepileuptoleaf 376023427
gmaxsg 0
gminsg 0
gmodz 0
gmul2nz 0
gmulgs 4887842
gmulz 11673
gnegz 0
gshiftz 0
gsubgs 398358
gsubz 0
gtodouble 24626516
gtofp 16332692
gtomp 22400
gtos 60550632
gtou 0
gval 490
icopy_avma 3314220869
idealpseudomin 149487
idealpseudomin_nonscalar 230278
idealred 148704
idealred_elt 315
identity_perm 64470
inf_get_sign 20561
is_bigint 124604818
is_const_t 700145384
is_extscalar_t 591332
is_intreal_t 766364
is_matvec_t 338931357
is_noncalc_t 50528125
is_pm1 1354195388
is_rational_t 417687
is_recursive_t 2156735207
is_scalar_t 153056586
is_universal_constant 30415860
is_vec_t 284727
isint1 5007337
isintm1 301
isintzero 308808534
ismpzero 766287
isonstack 2014250692
killblock 1022190
leading_term 64810049
leafcopy_avma 58242570
lgcols 27999452
lgpol 833315454
lincombii 17963566
matpascal 364
matslice 96789
mkcol 612141
mkcol2 12841189
mkcol2s 0
mkcol3 40453
mkcol3s 0
mkcol4 0
mkcol4s 0
mkcol5 0
mkcol6 351
mkcolcopy 27267
mkcols 0
mkcomplex 2615069
mkerr 0
mkfrac 43863
mkfraccopy 2475949
mkintmod 378999
mkintmodu 3675
mkmat 175621
mkmat2 10708098
mkmat3 2352
mkmat4 0
mkmat5 0
mkmatcopy 7203
mkmoo 5788
mkoo 9626
mkpolmod 238945
mkqfi 158123
mkquad 42
mkrfrac 7
mkrfraccopy 14
mkvec 2438391
mkvec2 12543929
mkvec2copy 167444
mkvec2s 10423
mkvec3 78717139
mkvec3s 492702
mkvec4 4161621
mkvec4s 7
mkvec5 11509125
mkveccopy 33180
mkvecs 7
mkvecsmall 29843760
mkvecsmall2 96040761
mkvecsmall3 40912789
mkvecsmall4 4635307
mkvecsmall5 153676
modpr_get_T 763417
modpr_get_p 2331
modpr_get_pr 1709096
mpcosz 0
mpexpz 0
mplogz 0
mpsinz 0
mul_content 238665
mul_denom 177071
mulsubii 1725107
nbits2extraprec 318416947
nbits2lg 2770800
nbits2nlong 714275
nbits2prec 72008119
nbrows 12709141
nchar2nlong 8699466
ndec2nlong 14221
ndec2prec 14221
nf_get_G 42238
nf_get_M 876973
nf_get_Tr 784
nf_get_degree 2590635
nf_get_diff 798
nf_get_disc 20567
nf_get_index 488081
nf_get_invzk 1084960
nf_get_pol 5688363
nf_get_r1 966855
nf_get_r2 1043
nf_get_ramified_primes 7
nf_get_roots 86071
nf_get_roundG 337627
nf_get_sign 3888
nf_get_varn 4325
nf_get_zk 5563371
normalize_frac 6309961
odd 563561372
pari_calloc 36502
pari_err_BUG 14
pari_err_COMPONENT 210
pari_err_CONSTPOL 7
pari_err_COPRIME 42
pari_err_DIM 827
pari_err_DOMAIN 5033
pari_err_FILE 0
pari_err_FLAG 21
pari_err_IMPL 217
pari_err_INV 697
pari_err_IRREDPOL 14
pari_err_MAXPRIME 0
pari_err_MODULUS 714
pari_err_OP 315
pari_err_OVERFLOW 63
pari_err_PACKAGE 0
pari_err_PREC 218
pari_err_PRIME 35
pari_err_PRIORITY 84
pari_err_ROOTS0 35
pari_err_SQRTN 77
pari_err_TYPE 36339
pari_err_TYPE2 2821
pari_err_VAR 490
pari_free 36819866
pari_malloc 165382718
pari_realloc 107464
pari_stack_alloc 315915097
pari_stack_base 315968561
pari_stack_delete 27828
pari_stack_init 57348
pari_stack_new 266944290
pari_stack_pushp 9320
perm_conj 35
perm_inv 98
perm_mul 18631944
pol0_F2x 2177869
pol0_Flx 27885478
pol1_F2x 631470
pol1_Flx 9899479
pol_0 14323242
pol_1 788531
pol_x 353983
polx_F2x 192731
polx_Flx 8262762
polx_zx 0
powIs 805
powii 313877
pr_get_e 1159408
pr_get_f 4648317
pr_get_gen 1732379
pr_get_p 8197263
pr_get_tau 4704519
pr_is_inert 491092
pr_norm 60964
prec2nbits 55001895
prec2nbits_mul 233112
prec2ndec 6134
precdbl 1667
qfb_disc 4222973
qfb_disc3 4293267
quad_disc 259
quadnorm 623
remsBIL 3339719829
resultant 25710
rnf_get_absdegree 155869
rnf_get_alpha 455
rnf_get_degree 310786
rnf_get_disc 63
rnf_get_idealdisc 420
rnf_get_index 98
rnf_get_invzk 1057
rnf_get_k 455
rnf_get_map 33929
rnf_get_nf 122577
rnf_get_nfdegree 15547
rnf_get_nfpol 107716
rnf_get_nfvarn 490
rnf_get_nfzk 6181
rnf_get_pol 461510
rnf_get_polabs 83013
rnf_get_varn 0
rnf_get_zk 3157
row 113560
row_i 2093
rowcopy 56
rowpermute 141968
rowslice 163135
rowslicepermute 19778
ser_isexactzero 1189024
shallowcopy 208500
sqrfrac 98617
sqrti 2884909
sqrtnr 32019
sqrtr 7397907
sturm 441
submulii 41124752
submuliu 7000
submuliu_inplace 264842739
truecoeff 0
trunc_safe 0
vec_append 55979
vec_ei 304025
vec_lengthen 7574
vec_setconst 1701
vec_shorten 0
vec_to_vecsmall 204356
vecpermute 4341622
vecreverse 1209933
vecreverse_inplace 225
vecslice 3347597
vecslicepermute 86886
vecsmall_append 358762
vecsmall_coincidence 0
vecsmall_concat 230658
vecsmall_copy 25268805
vecsmall_ei 7210
vecsmall_indexmax 14
vecsmall_indexmin 14
vecsmall_isin 0
vecsmall_lengthen 0
vecsmall_lexcmp 2586374
vecsmall_max 3779
vecsmall_min 133
vecsmall_pack 84
vecsmall_prefixcmp 35286195
vecsmall_prepend 784
vecsmall_shorten 16412
vecsmall_to_col 446503
vecsmall_to_vec 7559
vecsmallpermute 18324392
vecsmalltrunc_append 2281830
vecsmalltrunc_init 1201915
vecsplice 4991
vectrunc_append 10446198
vectrunc_append_batch 0
vectrunc_init 2184296
zc_to_ZC 427463
zero_F2m 0
zero_F2m_copy 96847
zero_F2v 682563
zero_F2x 77
zero_Flm 154
zero_Flm_copy 44434
zero_Flv 19896066
zero_Flx 100135
zero_zm 0
zero_zv 13417000
zero_zx 0
zerocol 23143976
zeromat 5600
zeromatcopy 2008347
zeropadic 275527
zeropadic_shallow 315
zeropol 4401698
zeroser 5257
zerovec 5814577
zm_copy 0
zm_row 0
zm_to_zxV 0
zm_transpose 91
zv_copy 1022969
zv_to_ZV 6370
zv_to_zx 0
zx_renormalize 0
zx_shift 0
zx_to_zv 0

Generated by: LCOV version 1.9