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 17774-15dbd24) Lines: 1179 1317 89.5 %
Date: 2015-04-27 Functions: 486 551 88.2 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 520 620 83.9 %

Function Name Sort by function name Hit count Sort by hit count
F2m_clear 0
F2m_coeff 11752610
F2m_copy 1449
F2m_flip 336170
F2m_set 1549002
F2v_clear 2111106
F2v_coeff 95732297
F2v_copy 0
F2v_ei 7
F2v_flip 336170
F2v_set 13117627
F2v_to_F2x 6013
F2x_clear 2111106
F2x_coeff 98274474
F2x_div 1134854
F2x_equal 1178530
F2x_equal1 150565
F2x_flip 336170
F2x_renormalize 56096725
F2x_set 32376037
Flm_copy 473401
Flm_row 28217
Flv_copy 1026400
Flx_copy 44918105
Flx_div 1401881
Flx_equal1 3743848
Flx_lead 349216
Flx_mulu 200026
FlxqX_div 6146
FlxqX_rem 161228
Flxq_add 0
Flxq_sub 0
FpV_FpC_mul 0
FpXQX_div 0
FpXQX_renormalize 826804
FpXQ_add 0
FpXQ_sub 0
FpXX_renormalize 874819
FpX_div 518558
FpX_renormalize 90133811
Fp_add 173005490
Fp_addmul 2376490
Fp_center 3090643
Fp_div 4372029
Fp_halve 16308
Fp_inv 7352180
Fp_invsafe 342914
Fp_mul 147098578
Fp_muls 231
Fp_mulu 60367181
Fp_neg 9647018
Fp_red 2903857
Fp_sqr 6184054
Fp_sub 61201482
FqXQ_add 0
FqXQ_div 16852
FqXQ_inv 0
FqXQ_invsafe 0
FqXQ_mul 107547
FqXQ_pow 0
FqXQ_sqr 39900
FqXQ_sub 0
FqX_Fp_mul 452339
FqX_Fq_mul 467870
FqX_add 768895
FqX_div 9597
FqX_div_by_X_x 5831
FqX_divrem 0
FqX_extgcd 37184
FqX_gcd 38234
FqX_mul 82915
FqX_mulu 389710
FqX_neg 4028
FqX_powu 994
FqX_red 7854
FqX_rem 26252
FqX_sqr 4270
FqX_sub 104264
Fq_red 1532702
Fq_to_FpXQ 3614
GENbinbase 54434776
QV_isscalar 5463184
Q_abs 312795
Q_abs_shallow 37841
RgC_fpnorml2 242522
RgC_gtofp 379309
RgC_gtomp 560
RgM_dimensions 115445
RgM_fpnorml2 1498
RgM_gtofp 18934
RgM_gtomp 14
RgM_inv 29853
RgM_minor 504
RgM_shallowcopy 4837467
RgV_is_QV 0
RgV_is_ZV 1275126
RgV_isscalar 6385
RgXQX_div 7
RgXQX_rem 31668
RgXQ_mul 395792
RgXQ_sqr 203995
RgX_coeff 360510
RgX_copy 62214696
RgX_div 6054119
RgX_equal_var 4074252
RgX_fpnorml2 10204
RgX_gtofp 421820
RgX_is_QX 109326
RgX_is_ZX 55698911
RgX_is_monomial 14649433
RgX_is_rational 2408
RgX_isscalar 0
RgX_rem 2553901
RgX_renormalize 171017
RgX_shift_inplace 533818
RgX_shift_inplace_init 533815
Rg_col_ei 3276210
ZC_hnfrem 801008
ZM_hnfrem 26138
ZM_lll 1132582
ZV_dvd 23198
ZV_isscalar 1566266
ZV_to_zv 192939
ZXQ_mul 104524
ZXQ_sqr 17556
ZX_ZXY_resultant 0
ZX_equal1 12743
ZX_renormalize 77253300
Z_ispower 14
Z_issquare 231357
abgrp_get_cyc 892335
abgrp_get_gen 227568
abgrp_get_no 7994
absfrac 1326057
absfrac_shallow 11564
addmuliu 7000
addmuliu_inplace 264440168
affc_fixlg 169778
affgr 176947
bid_get_arch 98487
bid_get_cyc 461384
bid_get_gen 4984
bid_get_gen_nocheck 0
bid_get_grp 466886
bid_get_ideal 72892
bid_get_mod 287293
bid_get_no 0
bin_copy 27218366
bit_accuracy 1109488017
bit_accuracy_mul 2501752
bit_prec 23607874
bnf_get_clgp 465216
bnf_get_cyc 242527
bnf_get_fu 6733
bnf_get_fu_nocheck 12067
bnf_get_gen 221996
bnf_get_logfu 347063
bnf_get_nf 927920
bnf_get_no 553
bnf_get_reg 601
bnf_get_tuN 7567
bnf_get_tuU 6034
bnr_get_bid 172086
bnr_get_bnf 345985
bnr_get_clgp 196810
bnr_get_cyc 187906
bnr_get_gen 1393
bnr_get_gen_nocheck 70
bnr_get_mod 9149
bnr_get_nf 2219
bnr_get_no 7441
both_odd 15981512
cbrtr 11355
cgetalloc 4709
cgetc 187335
cgiv 42524742
closure_arity 97797290
closure_codestr 85616100
closure_get_code 0
closure_get_data 85510275
closure_get_dbg 57966
closure_get_frame 82439
closure_get_oper 85578653
closure_get_text 117654
closure_is_variadic 12218816
col_ei 1167742
const_col 19696
const_vec 5709554
const_vecsmall 3229602
constant_term 17427180
cxcompotor 1656791
cxnorm 6901742
cxtofp 827280
cyclic_perm 0
dbllog2r 20672869
degpol 1525796035
divsBIL 3287007115
ellQp_get_p 245
ellQp_get_prec 84
ellQp_get_zero 336
ellR_get_prec 252
ellR_get_sign 688
ell_get_a1 1967161
ell_get_a2 1409783
ell_get_a3 1982941
ell_get_a4 2022549
ell_get_a6 2432378
ell_get_b2 2006220
ell_get_b4 433602
ell_get_b6 824944
ell_get_b8 688457
ell_get_c4 4710509
ell_get_c6 5070001
ell_get_disc 6408661
ell_get_j 946442
ell_get_type 6728429
ell_is_inf 17862541
ellff_get_a4a6 258895
ellff_get_field 603824
ellinf 402735
ellnf_get_nf 52885
equali1 169509069
equalim1 5725180
err_get_compo 77
err_get_num 130053
gabsz 0
gaddgs 6833867
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 20110
gdiventz 0
gdivsg 161961
gdivz 0
gen_I 410354
gener_Fq_local 462
gequalgs 22435
gerepileall 4147949
gerepilecoeffs 8
gerepilecopy 19830649
gerepilemany 37056
gerepileupto 417129926
gerepileuptoint 1030006650
gerepileuptoleaf 304701828
gmaxsg 0
gminsg 0
gmodz 0
gmul2nz 0
gmulgs 2828497
gmulz 11673
gnegz 0
gshiftz 0
gsubgs 392537
gsubz 0
gtodouble 24463011
gtofp 15913139
gtomp 22400
gtos 29909003
gtou 0
gval 427
icopy_avma 976653869
idealpseudomin 149487
idealpseudomin_nonscalar 230278
idealred 148704
idealred_elt 315
identity_perm 64470
inf_get_sign 20281
is_bigint 117508949
is_const_t 682371217
is_extscalar_t 591024
is_intreal_t 806509
is_matvec_t 303113053
is_noncalc_t 50369200
is_pm1 1117944414
is_rational_t 416861
is_recursive_t 2077842785
is_scalar_t 150267852
is_universal_constant 28993694
is_vec_t 282553
isint1 5000151
isintm1 301
isintzero 302209341
ismpzero 806432
isonstack 1794245362
killblock 992435
leading_term 63553278
leafcopy_avma 50160518
lgcols 23961692
lgpol 735552498
lincombii 17962530
matpascal 273
matslice 96600
mkcol 622508
mkcol2 12841035
mkcol2s 0
mkcol3 40369
mkcol3s 0
mkcol4 0
mkcol4s 0
mkcol5 0
mkcol6 351
mkcolcopy 27232
mkcols 0
mkcomplex 2771435
mkerr 0
mkfrac 43509
mkfraccopy 2460338
mkintmod 378964
mkintmodu 3675
mkmat 186485
mkmat2 9963286
mkmat3 2345
mkmat4 0
mkmat5 0
mkmatcopy 7203
mkmoo 5774
mkoo 9500
mkpolmod 238917
mkqfi 158109
mkquad 42
mkrfrac 7
mkrfraccopy 14
mkvec 2402127
mkvec2 10939771
mkvec2copy 167444
mkvec2s 10395
mkvec3 78648598
mkvec3s 492702
mkvec4 3588768
mkvec4s 7
mkvec5 11480782
mkveccopy 33180
mkvecs 7
mkvecsmall 28832614
mkvecsmall2 91478182
mkvecsmall3 35514302
mkvecsmall4 1480943
mkvecsmall5 104716
modpr_get_T 763305
modpr_get_p 2331
modpr_get_pr 1708851
mpcosz 0
mpexpz 0
mplogz 0
mpsinz 0
mul_content 238609
mul_denom 176784
mulsubii 1725079
nbits2extraprec 321088031
nbits2lg 2734565
nbits2nlong 689614
nbits2prec 71327768
nbrows 12687400
nchar2nlong 8649564
ndec2nlong 14044
ndec2prec 14044
nf_get_G 42238
nf_get_M 876952
nf_get_Tr 784
nf_get_degree 2590355
nf_get_diff 798
nf_get_disc 20525
nf_get_index 488046
nf_get_invzk 1084806
nf_get_pol 5687691
nf_get_r1 966813
nf_get_r2 1043
nf_get_ramified_primes 7
nf_get_roots 86050
nf_get_roundG 337627
nf_get_sign 3888
nf_get_varn 4325
nf_get_zk 5563027
normalize_frac 6213983
odd 282588870
pari_calloc 35857
pari_err_BUG 14
pari_err_COMPONENT 210
pari_err_CONSTPOL 7
pari_err_COPRIME 42
pari_err_DIM 827
pari_err_DOMAIN 5019
pari_err_FILE 0
pari_err_FLAG 21
pari_err_IMPL 224
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 36311
pari_err_TYPE2 2821
pari_err_VAR 490
pari_free 36010133
pari_malloc 106988423
pari_realloc 105385
pari_stack_alloc 226209667
pari_stack_base 226258434
pari_stack_delete 27513
pari_stack_init 54846
pari_stack_new 198358642
pari_stack_pushp 9236
perm_conj 35
perm_inv 98
perm_mul 18123448
pol0_F2x 2080255
pol0_Flx 26950743
pol1_F2x 571971
pol1_Flx 9459678
pol_0 12047240
pol_1 667668
pol_x 321878
polx_F2x 189007
polx_Flx 5896108
polx_zx 0
powIs 805
powii 313863
pr_get_e 1159331
pr_get_f 4648093
pr_get_gen 1732288
pr_get_p 8196843
pr_get_tau 4704477
pr_is_inert 491085
pr_norm 60957
prec2nbits 55026228
prec2nbits_mul 226949
prec2ndec 6064
precdbl 1667
qfb_disc 3716345
qfb_disc3 3786639
quad_disc 175
quadnorm 623
remsBIL 3212673916
resultant 25696
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 113245
row_i 2093
rowcopy 56
rowpermute 141860
rowslice 162810
rowslicepermute 19698
ser_isexactzero 1185293
shallowcopy 206027
sqrfrac 118592
sqrti 2448912
sqrtnr 31878
sqrtr 6803833
sturm 441
submulii 41124333
submuliu 7000
submuliu_inplace 264840934
truecoeff 0
trunc_safe 0
vec_append 55979
vec_ei 303822
vec_lengthen 7574
vec_setconst 1701
vec_shorten 0
vec_to_vecsmall 203593
vecpermute 4339248
vecreverse 50883
vecreverse_inplace 225
vecslice 3332272
vecslicepermute 86632
vecsmall_append 357089
vecsmall_coincidence 0
vecsmall_concat 230658
vecsmall_copy 25035526
vecsmall_ei 7196
vecsmall_indexmax 14
vecsmall_indexmin 14
vecsmall_isin 111174
vecsmall_lengthen 448
vecsmall_lexcmp 2586374
vecsmall_max 3779
vecsmall_min 133
vecsmall_pack 84
vecsmall_prefixcmp 35286195
vecsmall_prepend 784
vecsmall_shorten 4536
vecsmall_to_col 446355
vecsmall_to_vec 7559
vecsmallpermute 17816176
vecsmalltrunc_append 2281459
vecsmalltrunc_init 1201824
vecsplice 4984
vectrunc_append 1148948
vectrunc_append_batch 0
vectrunc_init 700948
zc_to_ZC 427315
zero_F2m 0
zero_F2m_copy 96539
zero_F2v 681821
zero_F2x 77
zero_Flm 315
zero_Flm_copy 23532
zero_Flv 19279276
zero_Flx 83306
zero_zm 0
zero_zv 13357141
zero_zx 0
zerocol 23060100
zeromat 5600
zeromatcopy 1994590
zeropadic 273812
zeropadic_shallow 315
zeropol 4347953
zeroser 5005
zerovec 5740523
zm_copy 0
zm_row 0
zm_to_zxV 0
zm_transpose 91
zv_copy 729250
zv_to_ZV 6370
zv_to_zx 0
zx_renormalize 0
zx_shift 0
zx_to_zv 0

Generated by: LCOV version 1.9