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 20079-8a65571) Lines: 1202 1365 88.1 %
Date: 2017-01-18 05:50:33 Functions: 510 579 88.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
F2m_clear 0
F2m_coeff 12583940
F2m_copy 1720
F2m_flip 1338630
F2m_set 1603119
F2v_clear 3549734
F2v_coeff 153711988
F2v_copy 0
F2v_ei 7
F2v_flip 1338630
F2v_set 68046842
F2v_to_F2x 7057
F2x_clear 3549734
F2x_coeff 157492478
F2x_copy 66088929
F2x_div 2838256
F2x_equal 3316685
F2x_equal1 790986
F2x_flip 1338630
F2x_renormalize 125924490
F2x_set 92496130
F2xqX_div 29785
Flm_copy 868008
Flm_row 25632
Flv_copy 2281242
Flx_copy 74384541
Flx_div 3050575
Flx_equal1 4643927
Flx_lead 406837
Flx_mulu 665920
FlxqX_div 31471
Flxq_add 0
Flxq_sub 110
FpV_FpC_mul 0
FpXQX_div 954
FpXQX_renormalize 987794
FpXQ_add 0
FpXQ_sub 0
FpXX_renormalize 948940
FpX_div 750286
FpX_renormalize 86993167
Fp_add 62845156
Fp_addmul 1437485
Fp_center 5183124
Fp_div 4687717
Fp_halve 19785
Fp_inv 7671414
Fp_invsafe 289493
Fp_mul 50261547
Fp_muls 0
Fp_mulu 45059304
Fp_neg 10722971
Fp_red 1723297
Fp_sqr 6943644
Fp_sub 45648154
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 603186
FqX_Fq_mul 552791
FqX_add 903963
FqX_deriv 268604
FqX_div 2977
FqX_div_by_X_x 5957
FqX_divrem 329
FqX_extgcd 77196
FqX_factor 71141
FqX_gcd 254102
FqX_get_red 5605
FqX_halfgcd 0
FqX_mul 81915
FqX_mulu 459861
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 1299835
Fq_to_FpXQ 11821
GENbinbase 80911841
QV_isscalar 6172248
Q_abs 531720
Q_abs_shallow 31799
R_abs 0
R_abs_shallow 322
RgC_fpnorml2 132616
RgC_gtofp 264618
RgC_gtomp 560
RgM_dimensions 107496
RgM_fpnorml2 1472
RgM_gtofp 18747
RgM_gtomp 14
RgM_inv 24397
RgM_minor 756
RgM_shallowcopy 8050233
RgV_is_QV 147
RgV_is_ZV 2481653
RgV_isscalar 3752
RgXQX_div 7
RgXQX_rem 17192
RgXQ_mul 475074
RgXQ_sqr 241510
RgX_coeff 2233127
RgX_copy 62259580
RgX_div 6099886
RgX_equal_var 4035229
RgX_fpnorml2 7162
RgX_gtofp 460538
RgX_is_QX 162200
RgX_is_ZX 55096505
RgX_is_monomial 15222684
RgX_is_rational 2493
RgX_isscalar 0
RgX_rem 2525384
RgX_renormalize 310625
RgX_shift_inplace 582396
RgX_shift_inplace_init 582390
Rg_col_ei 2879833
ZC_hnfrem 785173
ZM_hnfrem 23454
ZM_lll 1266011
ZV_dvd 23198
ZV_isscalar 2038253
ZV_to_zv 221947
ZXQ_mul 117698
ZXQ_sqr 20958
ZX_ZXY_resultant 0
ZX_equal1 17993
ZX_renormalize 73687498
Z_ispower 14
Z_issquare 1964345
abgrp_get_cyc 1234946
abgrp_get_gen 304020
abgrp_get_no 9520
absfrac 1673096
absfrac_shallow 10909
addmuliu 7000
addmuliu_inplace 109217656
affc_fixlg 186966
affgr 180734
bid_get_U 463804
bid_get_arch 448
bid_get_archp 235871
bid_get_cyc 669309
bid_get_fact 239637
bid_get_fact2 232084
bid_get_gen 7399
bid_get_gen_nocheck 0
bid_get_grp 677303
bid_get_ideal 30485
bid_get_ind 0
bid_get_mod 263682
bid_get_no 0
bid_get_sarch 6447
bid_get_sprk 232154
bin_copy 40457193
bit_accuracy 1100412840
bit_accuracy_mul 451603
bit_prec 23592760
bnf_get_clgp 623279
bnf_get_cyc 326763
bnf_get_fu 1806
bnf_get_fu_nocheck 3802
bnf_get_gen 295060
bnf_get_logfu 478853
bnf_get_nf 1379598
bnf_get_no 1127
bnf_get_reg 860
bnf_get_tuN 7665
bnf_get_tuU 2528
bnr_get_bid 218651
bnr_get_bnf 442125
bnr_get_clgp 260714
bnr_get_cyc 237460
bnr_get_gen 13965
bnr_get_gen_nocheck 70
bnr_get_mod 24906
bnr_get_nf 13398
bnr_get_no 8393
both_odd 7412063
cbrtr 12068
cgetalloc 5311
cgetc 204463
cgiv 26992038
closure_arity 186021813
closure_codestr 151471966
closure_get_code 0
closure_get_data 151390132
closure_get_dbg 16869
closure_get_frame 431140
closure_get_oper 151410283
closure_get_text 36937
closure_is_variadic 34325461
col_ei 1316648
const_col 32427
const_vec 9340150
const_vecsmall 5061305
constant_coeff 17560857
cxcompotor 2076301
cxnorm 8725956
cxtofp 1036448
cyclic_perm 0
dbllog2r 16944361
degpol 2449155938
divsBIL 2995206886
ellQp_get_p 623
ellQp_get_prec 287
ellQp_get_zero 917
ellR_get_prec 36946
ellR_get_sign 1409
ell_get_a1 5005033
ell_get_a2 3297195
ell_get_a3 4477702
ell_get_a4 4094936
ell_get_a6 4668803
ell_get_b2 3949455
ell_get_b4 1009632
ell_get_b6 1613480
ell_get_b8 1457365
ell_get_c4 6110841
ell_get_c6 8142500
ell_get_disc 9571388
ell_get_j 1174642
ell_get_type 7853574
ell_is_inf 25382346
ellff_get_a4a6 652592
ellff_get_field 1510712
ellinf 812602
ellnf_get_bnf 42
ellnf_get_nf 522039
equali1 211325525
equalim1 23514263
err_get_compo 70
err_get_num 51135
gabsz 0
gaddgs 7451611
gaddz 23318
gal_get_den 1827
gal_get_e 63
gal_get_gen 1267
gal_get_group 3843
gal_get_invvdm 1827
gal_get_mod 1820
gal_get_orders 812
gal_get_p 994
gal_get_pol 2247
gal_get_roots 2198
gcmpgs 24478
gdiventz 0
gdivsg 452171
gdivz 0
gen_I 423859
gener_Fq_local 833
gequalgs 22827
gerepileall 4920816
gerepilecoeffs 8
gerepilecopy 36192115
gerepilemany 64820
gerepileupto 628554047
gerepileuptoint 921886446
gerepileuptoleaf 516315827
gmaxsg 0
gminsg 0
gmodz 0
gmul2nz 0
gmulgs 5692117
gmulz 11673
gnegz 0
gshiftz 0
gsubgs 557317
gsubz 0
gtodouble 25736307
gtofp 18251318
gtomp 22400
gtos 64668897
gtou 82591
gval 2205
icopy_avma 3652527264
idealchineseinit 1218
idealpseudomin 169426
idealpseudomin_nonscalar 276518
idealpseudored 5124
idealred 174398
idealred_elt 0
identity_perm 69813
inf_get_sign 29055
is_bigint 127466983
is_const_t 1061187230
is_extscalar_t 26557
is_intreal_t 929650
is_matvec_t 354262675
is_noncalc_t 51824902
is_pm1 1529803981
is_rational_t 587893
is_real_t 42896
is_recursive_t 2526224390
is_scalar_t 152640586
is_universal_constant 17053759
is_vec_t 475251
isint1 6350413
isintm1 301
isintzero 360053080
ismpzero 929573
isonstack 2093826188
killblock 1110097
leading_coeff 73420643
leafcopy_avma 103588014
lgcols 60005577
lgpol 1291261809
lincombii 26483897
logint 407840
matpascal 1008
matslice 114555
mkcol 2093680
mkcol2 14737799
mkcol2s 1181376
mkcol3 41615
mkcol3s 0
mkcol4 0
mkcol4s 0
mkcol5 0
mkcol6 729
mkcolcopy 25832
mkcols 728
mkcomplex 2776557
mkerr 0
mkfrac 1835272
mkfraccopy 2788150
mkintmod 332330
mkintmodu 3780
mkmat 713062
mkmat2 15696527
mkmat3 2352
mkmat4 0
mkmat5 0
mkmatcopy 7117
mkmoo 7881
mkoo 14093
mkpolmod 288712
mkqfi 158123
mkquad 42
mkrfrac 5019
mkrfraccopy 14
mkvec 5777851
mkvec2 22551978
mkvec2copy 195304
mkvec2s 12026
mkvec3 53392512
mkvec3s 492702
mkvec4 7328814
mkvec4s 0
mkvec5 11756374
mkveccopy 33278
mkvecs 7
mkvecsmall 49500269
mkvecsmall2 110212299
mkvecsmall3 61882350
mkvecsmall4 9281154
mkvecsmall5 443054
modpr_get_T 1809532
modpr_get_p 602514
modpr_get_pr 6275594
mpcosz 0
mpexpz 0
mplogz 0
mpsinz 0
mul_content 225152
mul_denom 435973
mulsubii 2246276
nbits2extraprec 240411661
nbits2lg 3281396
nbits2ndec 172
nbits2nlong 3640943
nbits2prec 74201834
nbrows 14470580
nchar2nlong 6772597
ndec2nbits 461
ndec2nlong 23097
ndec2prec 22636
nf_get_G 45427
nf_get_M 1119442
nf_get_Tr 819
nf_get_degree 3059147
nf_get_diff 1729
nf_get_disc 23442
nf_get_index 628942
nf_get_invzk 1683453
nf_get_pol 7102735
nf_get_r1 1168606
nf_get_r2 1113
nf_get_ramified_primes 35
nf_get_roots 99792
nf_get_roundG 413685
nf_get_sign 6685
nf_get_varn 3002
nf_get_zk 6455897
normalize_frac 8242448
odd 1316209919
pari_calloc 29916
pari_err_BUG 14
pari_err_COMPONENT 224
pari_err_CONSTPOL 7
pari_err_COPRIME 63
pari_err_DIM 925
pari_err_DOMAIN 5187
pari_err_FILE 0
pari_err_FLAG 28
pari_err_IMPL 322
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 28373
pari_err_TYPE2 3073
pari_err_VAR 203
pari_free 48849281
pari_malloc 186311963
pari_realloc 314211
pari_stack_alloc 328991952
pari_stack_base 329852401
pari_stack_delete 778231
pari_stack_init 899876
pari_stack_new 275568635
pari_stack_pushp 5747
perm_conj 35
perm_inv 862519
perm_mul 23116165
pol0_F2x 10859736
pol0_Flx 43492628
pol1_F2x 2645086
pol1_Flx 17469802
pol_0 13717781
pol_1 1189357
pol_x 682903
pol_xn 2310172
pol_xnall 133
polx_F2x 653933
polx_Flx 16790826
polx_zx 0
powIs 840
powii 211466
pr_get_e 2053736
pr_get_f 6091926
pr_get_gen 2177627
pr_get_p 14851713
pr_get_tau 5794688
pr_is_inert 771881
pr_norm 309857
prec2nbits 1179373758
prec2nbits_mul 232174
prec2ndec 12057
precdbl 1741
qfb_disc 5905760
qfb_disc3 5997600
quad_disc 252
quadnorm 623
remsBIL 2930231920
resultant 34961
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 115790
row_i 2177
rowcopy 56
rowpermute 85093
rowslice 229976
rowslicepermute 35196
rowsplice 133
ser_isexactzero 4026100
shallowcopy 2273397
sqrfrac 1418988
sqrti 4668991
sqrtnr 34773
sqrtr 15769042
sturm 448
submulii 13424513
submuliu 7000
submuliu_inplace 110552350
truecoeff 0
trunc_safe 0
upr_norm 32368
vec_append 56056
vec_ei 304179
vec_lengthen 10577
vec_setconst 0
vec_shorten 0
vec_to_vecsmall 232706
vecpermute 4340794
vecreverse 4730006
vecreverse_inplace 232
vecslice 3778640
vecslicepermute 140600
vecsmall_append 371437
vecsmall_coincidence 0
vecsmall_concat 243189
vecsmall_copy 1612248
vecsmall_ei 40345
vecsmall_indexmax 14
vecsmall_indexmin 14
vecsmall_isin 0
vecsmall_lengthen 21
vecsmall_lexcmp 25701387
vecsmall_max 39841
vecsmall_min 0
vecsmall_pack 84
vecsmall_prefixcmp 47066978
vecsmall_prepend 1253
vecsmall_reverse 252
vecsmall_shorten 127830
vecsmall_to_col 1269697
vecsmall_to_vec 17066
vecsmallpermute 20065551
vecsmalltrunc_append 2869442
vecsmalltrunc_init 1401744
vecsplice 8288
vectrunc_append 42850288
vectrunc_append_batch 0
vectrunc_init 11511047
zc_to_ZC 1232254
zero_F2m 0
zero_F2m_copy 269652
zero_F2v 3381629
zero_F2x 35
zero_Flm 287
zero_Flm_copy 74215
zero_Flv 31971607
zero_Flx 777651
zero_zm 0
zero_zv 16309504
zero_zx 0
zerocol 22106141
zeromat 4662
zeromatcopy 1960306
zeropadic 300979
zeropadic_shallow 504
zeropol 5046729
zeroser 14091
zerovec 7826896
zm_copy 0
zm_row 0
zm_to_zxV 0
zm_transpose 168
zv_copy 1982497
zv_to_ZV 14413
zv_to_zx 0
zx_renormalize 0
zx_shift 0
zx_to_zv 0

Generated by: LCOV version 1.11