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 16746-c2cb716) Lines: 1142 1291 88.5 %
Date: 2014-08-31 Functions: 469 538 87.2 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 493 604 81.6 %

Function Name Sort by function name Hit count Sort by hit count
F2m_clear 0
F2m_coeff 9906113
F2m_copy 1000
F2m_flip 227796
F2m_set 1571959
F2v_clear 1298874
F2v_coeff 57048427
F2v_copy 0
F2v_ei 5
F2v_flip 227796
F2v_set 10294996
F2v_to_F2x 4075
F2x_clear 1298874
F2x_coeff 57300880
F2x_div 700074
F2x_equal 675291
F2x_equal1 1042
F2x_flip 227796
F2x_renormalize 17916431
F2x_set 14867831
Flm_copy 325714
Flv_copy 653287
Flx_copy 23755734
Flx_div 891988
Flx_equal1 1936494
Flx_lead 45331
Flx_mulu 118835
FlxqX_div 3455
FlxqX_rem 35114
Flxq_add 0
Flxq_sub 0
FpV_FpC_mul 0
FpXQX_div 0
FpXQX_renormalize 278391
FpXQ_add 0
FpXQ_sub 0
FpXX_renormalize 147859
FpX_div 417285
FpX_renormalize 54019396
Fp_add 23996165
Fp_addmul 1649870
Fp_center 1971596
Fp_div 1336330
Fp_halve 9779
Fp_inv 3076494
Fp_invsafe 193602
Fp_mul 15906247
Fp_muls 165
Fp_mulu 17399337
Fp_neg 6262355
Fp_red 6522063
Fp_sqr 3634595
Fp_sub 31745801
FqXQ_add 0
FqXQ_div 11160
FqXQ_inv 0
FqXQ_invsafe 0
FqXQ_mul 26190
FqXQ_pow 0
FqXQ_sqr 11365
FqXQ_sub 0
FqX_Fp_mul 312032
FqX_Fq_mul 320840
FqX_add 491676
FqX_div 2285
FqX_divrem 0
FqX_extgcd 21195
FqX_gcd 7175
FqX_mul 31015
FqX_mulu 250038
FqX_neg 2670
FqX_red 2120
FqX_rem 8085
FqX_sqr 1085
FqX_sub 54015
Fq_red 1189893
GENbinbase 36287934
QV_isscalar 4350860
Q_abs 171927
Q_abs_shallow 20520
RgC_fpnorml2 83060
RgC_gtofp 170968
RgC_gtomp 400
RgM_dimensions 81268
RgM_fpnorml2 410
RgM_gtofp 12419
RgM_gtomp 10
RgM_inv 19547
RgM_minor 265
RgM_shallowcopy 3755834
RgV_is_QV 0
RgV_is_ZV 916888
RgV_isscalar 4435
RgXQX_div 0
RgXQX_rem 7440
RgXQ_mul 197380
RgXQ_sqr 97720
RgX_coeff 3840
RgX_copy 40945188
RgX_div 4499129
RgX_equal_var 565778
RgX_fpnorml2 6095
RgX_gtofp 271675
RgX_is_QX 3750
RgX_is_ZX 38590934
RgX_is_monomial 10677676
RgX_is_rational 475
RgX_isscalar 0
RgX_rem 999224
RgX_renormalize 115525
RgX_shift_inplace 357963
RgX_shift_inplace_init 357963
Rg_col_ei 2502337
ZC_hnfrem 604567
ZM_hnfrem 18205
ZM_lll 882042
ZV_dvd 16570
ZV_isscalar 888558
ZV_to_zv 137726
ZXQ_mul 62010
ZXQ_sqr 9630
ZX_ZXY_resultant 0
ZX_equal1 9062
ZX_renormalize 47523852
Z_ispower 10
Z_issquare 164395
abgrp_get_cyc 798612
abgrp_get_gen 198186
abgrp_get_no 5630
absfrac 806055
absfrac_shallow 5585
addmuliu 5000
addmuliu_inplace 167195841
affc_fixlg 19085
affgr 2292369
bid_get_arch 91213
bid_get_cyc 421225
bid_get_gen 3390
bid_get_gen_nocheck 0
bid_get_grp 425355
bid_get_ideal 65732
bid_get_mod 255124
bid_get_no 0
bin_copy 18147028
bit_accuracy 647100037
bit_accuracy_mul 1539479
bit_prec 15799910
bnf_get_clgp 402282
bnf_get_cyc 207731
bnf_get_fu 4390
bnf_get_fu_nocheck 7965
bnf_get_gen 194011
bnf_get_logfu 317962
bnf_get_nf 787589
bnf_get_no 435
bnf_get_reg 280
bnf_get_tuN 5105
bnf_get_tuU 4010
bnr_get_bid 158136
bnr_get_bnf 317607
bnr_get_clgp 175091
bnr_get_cyc 168916
bnr_get_gen 935
bnr_get_gen_nocheck 45
bnr_get_mod 6200
bnr_get_nf 1365
bnr_get_no 5195
both_odd 30647712
cgetalloc 1864
cgetc 36819
cgiv 28021676
closure_arity 62734283
closure_codestr 54943783
closure_get_code 0
closure_get_data 54941218
closure_get_dbg 2675
closure_get_frame 730
closure_get_oper 54943783
closure_get_text 5795
closure_is_variadic 7785580
col_ei 890130
const_col 11636
const_vec 4503780
const_vecsmall 2501661
constant_term 12427125
cxcompotor 827239
cxnorm 3868013
cxtofp 413013
cyclic_perm 0
dbllog2r 11191521
degpol 873346316
divsBIL 2130048008
ellQp_get_p 175
ellQp_get_prec 60
ellQp_get_zero 240
ellR_get_prec 180
ellR_get_sign 477
ell_get_a1 1397093
ell_get_a2 1006228
ell_get_a3 1408818
ell_get_a4 1444203
ell_get_a6 1737153
ell_get_b2 1426006
ell_get_b4 311211
ell_get_b6 590691
ell_get_b8 491445
ell_get_c4 3356468
ell_get_c6 3613588
ell_get_disc 4481255
ell_get_j 629055
ell_get_type 4778088
ell_is_inf 14123080
ellff_get_a4a6 182680
ellff_get_field 411510
ellinf 284208
ellnf_get_nf 35025
equali1 115069660
equalim1 40064
err_get_compo 55
err_get_num 15376
gabsz 0
gaddgs 1020093
gaddz 32988
gal_get_den 1080
gal_get_e 30
gal_get_gen 625
gal_get_group 565
gal_get_invvdm 1080
gal_get_mod 1070
gal_get_orders 295
gal_get_p 660
gal_get_pol 620
gal_get_roots 1325
gcmpgs 6975
gdiventz 0
gdivsg 73154
gdivz 0
gen_I 117796
gener_Fq_local 275
gequalgs 3990
gerepileall 2467204
gerepilecoeffs 6
gerepilecopy 13882973
gerepilemany 26105
gerepileupto 262021357
gerepileuptoint 519905387
gerepileuptoleaf 123544552
gmaxsg 0
gminsg 0
gmodz 0
gmul2nz 0
gmulgs 1422538
gmulz 16514
gnegz 0
gshiftz 0
gsubgs 270149
gsubz 0
gtodouble 3767921
gtofp 4482687
gtomp 16000
gtos 20065925
gtou 0
gval 5795
icopy_avma 559390469
idealpseudomin 99748
idealpseudomin_nonscalar 194253
idealred 99219
idealred_elt 210
identity_perm 45505
inf_get_sign 8382
is_bigint 80096346
is_const_t 394426730
is_extscalar_t 416989
is_intreal_t 357545
is_matvec_t 212504746
is_noncalc_t 36490427
is_pm1 538556026
is_rational_t 77673
is_recursive_t 1242044502
is_scalar_t 107693240
is_universal_constant 11407898
is_vec_t 550548
isint1 2846263
isintm1 0
isintzero 183729566
ismpzero 357475
isonstack 933501028
killblock 688574
leading_term 39666984
leafcopy_avma 29657899
lgcols 15420755
lgpol 334001441
lincombii 9982278
matpascal 195
mkcol 480879
mkcol2 8288057
mkcol2s 0
mkcol3 28725
mkcol3s 0
mkcol4 0
mkcol4s 0
mkcol5 0
mkcolcopy 18111
mkcols 0
mkcomplex 2141564
mkerr 0
mkfrac 28716
mkfraccopy 1035751
mkintmod 282796
mkintmodu 2525
mkmat 177479
mkmat2 6215326
mkmat3 2120
mkmat4 0
mkmat5 0
mkmatcopy 3655
mkmoo 2629
mkoo 4321
mkpolmod 45430
mkqfi 112935
mkquad 45
mkrfrac 5
mkrfraccopy 10
mkvec 1160066
mkvec2 9194892
mkvec2copy 113349
mkvec2s 6290
mkvec3 14192796
mkvec3s 351780
mkvec4 2571501
mkvec4s 5
mkvec5 8312437
mkveccopy 23369
mkvecs 5
mkvecsmall 14969257
mkvecsmall2 66003309
mkvecsmall3 22612166
mkvecsmall4 283697
mkvecsmall5 115
mpcosz 0
mpexpz 0
mplogz 0
mpsinz 0
mul_content 138933
mul_denom 111014
mulsubii 992482
nbits2extraprec 167650240
nbits2lg 1673267
nbits2nlong 526373
nbits2prec 50249631
nbrows 8973559
nchar2nlong 5919675
ndec2nlong 11026
ndec2prec 11026
nf_get_G 25103
nf_get_M 754493
nf_get_Tr 515
nf_get_degree 1922792
nf_get_diff 510
nf_get_disc 12360
nf_get_index 338113
nf_get_invzk 818378
nf_get_pol 4193701
nf_get_r1 768217
nf_get_r2 195
nf_get_roots 27092
nf_get_roundG 266965
nf_get_sign 2525
nf_get_varn 2275
nf_get_zk 4383322
normalize_frac 2880521
odd 161855538
pari_calloc 13396
pari_err_BUG 0
pari_err_COMPONENT 145
pari_err_CONSTPOL 5
pari_err_COPRIME 30
pari_err_DIM 141
pari_err_DOMAIN 866
pari_err_FILE 0
pari_err_FLAG 5
pari_err_IMPL 80
pari_err_INV 465
pari_err_IRREDPOL 10
pari_err_MAXPRIME 0
pari_err_MODULUS 505
pari_err_OP 220
pari_err_OVERFLOW 40
pari_err_PACKAGE 0
pari_err_PREC 161
pari_err_PRIME 25
pari_err_PRIORITY 45
pari_err_ROOTS0 25
pari_err_SQRTN 50
pari_err_TYPE 7586
pari_err_TYPE2 1990
pari_err_VAR 350
pari_free 25415459
pari_malloc 73738580
pari_realloc 43250
pari_stack_alloc 151247927
pari_stack_base 151265138
pari_stack_delete 11929
pari_stack_init 16383
pari_stack_new 132419364
pari_stack_pushp 5277
perm_conj 25
perm_inv 40
perm_mul 12663334
pol0_F2x 1181086
pol0_Flx 13790736
pol1_F2x 331570
pol1_Flx 6521909
pol_0 8394795
pol_1 382171
pol_x 196377
polx_F2x 123308
polx_Flx 3773624
polx_zx 0
powIs 530
powii 250112
pr_get_e 876575
pr_get_f 2938331
pr_get_gen 1333201
pr_get_p 3950830
pr_get_tau 1676570
pr_is_inert 395220
pr_norm 52951
prec2nbits 32620126
prec2nbits_mul 35062
prec2ndec 2660
precdbl 1096
qfb_disc 2654440
qfb_disc3 2704645
quad_disc 130
quadnorm 760
remsBIL 2081322335
resultant 17575
rnf_get_absdegree 130
rnf_get_degree 655
rnf_get_disc 100
rnf_get_index 75
rnf_get_invzk 755
rnf_get_map 960
rnf_get_nf 3530
rnf_get_nfdegree 385
rnf_get_nfpol 3310
rnf_get_nfvarn 40
rnf_get_nfzk 525
rnf_get_pol 5055
rnf_get_polabs 1300
rnf_get_varn 0
rnf_get_zk 1375
row 80746
row_Flm 17196
row_i 1400
row_zm 0
rowcopy 15
rowpermute 97654
rowslice 66145
rowslicepermute 13496
ser_isexactzero 449178
shallowcopy 133505
sqrfrac 75312
sqrti 1750120
sqrtnr 19384
sqrtr 3689978
sturm 5
submulii 27368366
submuliu 5000
submuliu_inplace 167431831
truecoeff 5
trunc_safe 0
vec_append 39210
vec_ei 211981
vec_lengthen 5410
vec_setconst 1200
vec_shorten 0
vec_to_vecsmall 143721
vecpermute 3137381
vecreverse 760
vecreverse_inplace 156
vecslice 1348810
vecslicepermute 59092
vecsmall_append 252580
vecsmall_coincidence 0
vecsmall_concat 137350
vecsmall_copy 11544347
vecsmall_ei 5050
vecsmall_indexmax 10
vecsmall_indexmin 10
vecsmall_isin 0
vecsmall_lengthen 320
vecsmall_lexcmp 1847410
vecsmall_max 1170
vecsmall_min 0
vecsmall_pack 60
vecsmall_prefixcmp 25204425
vecsmall_prepend 535
vecsmall_shorten 2995
vecsmall_to_col 335442
vecsmall_to_vec 3894
vecsmallpermute 12444159
vecsmalltrunc_append 1852828
vecsmalltrunc_init 979032
vecsplice 2905
vectrunc_append 599082
vectrunc_append_batch 0
vectrunc_init 380399
zc_to_ZC 322507
zero_F2m 0
zero_F2m_copy 65793
zero_F2v 522026
zero_F2x 55
zero_Flm 95
zero_Flm_copy 8330
zero_Flv 9105177
zero_Flx 33748
zero_zm 0
zero_zv 5207519
zero_zx 0
zerocol 15525123
zeromat 3745
zeromatcopy 1474329
zeropadic 7630
zeropadic_shallow 225
zeropol 2912712
zeroser 11820
zerovec 3986104
zm_copy 0
zm_to_zxV 0
zm_transpose 65
zv_copy 511595
zv_to_ZV 3040
zv_to_zx 0
zx_renormalize 0
zx_shift 0
zx_to_zv 0

Generated by: LCOV version 1.9