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 - basemath - arith1.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 16804-345a01c) Lines: 2283 2668 85.6 %
Date: 2014-09-20 Functions: 194 213 91.1 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1568 2216 70.8 %

Function Name Sort by function name Hit count Sort by hit count
Fl_2gener_pre_all 3213513
Fl_lgener_pre_all 0
Fl_order 3003
Fl_powu 55462907
Fl_powu_pre 9596380
Fl_sqrt 5249284
Fl_sqrt_i 5249298
Fl_sqrt_pre 14
Fl_sqrtl 0
Fl_sqrtl_i 0
Fl_sqrtl_pre 0
Fp_easylog 162490
Fp_factored_order 49
Fp_invmBarrett 6357
Fp_ispower 168
Fp_log 185590
Fp_log_find_ind 42
Fp_log_find_rel 154
Fp_log_halfgcd 57526
Fp_log_index 21
Fp_log_sieve_h 28770
Fp_log_use_index 152591
Fp_order 6162
Fp_pow 2189475
Fp_pows 14336
Fp_powu 3673853
Fp_rem_mBarrett 322063
Fp_select_red 284489
Fp_sqrt 1615096
Fp_sqrtn 1302
Qsfcont 1980503
Shanks_order 161
U2_issquare 2373
Up_ispower 238
Up_issquare 4690
ZT_sqr 0
ZV_allpnqn 455
ZV_chinese 0
ZV_chinesetree 0
ZV_invdivexact 0
ZV_polint_tree 0
ZV_producttree 0
ZV_sqr 0
Z_ZV_mod 0
Z_ZV_mod_tree 0
Z_chinese 1988
Z_chinese_all 108566
Z_chinese_coprime 411992
Z_chinese_post 596005
Z_chinese_pre 126948
Z_factor_listP 350651
Z_isanypower 7001750
Z_isanypower_aux 7001750
Z_isanypower_nosmalldiv 864271
Z_isfundamental 14581
Z_ispow2 19874
Z_ispowerall 707
Z_issquareall 2848921
Zn_ispower 266
Zn_issquare 2548
Zp_issquare 0
Zp_order 70
_Fp_add 36319626
_Fp_equal0 2270340
_Fp_inv 129660
_Fp_mul 84259
_Fp_neg 720537
_Fp_pow 399836
_Fp_rand 329
_Fp_red 8831756
_Fp_rmul 37914449
_Fp_s 725378
_m2sqr 2282827
_montred 11526147
_mul 766653
_muli2montred 1904040
_muli2red 2282827
_psi 742
_remii 2873796
_remiibar 322063
_sqr 11439969
addifsmooth1 29078
addifsmooth2 205667
bestappr 3420
bestapprPade 63
bestappr_Q 254652
bestappr_RgX 63
bestappr_frac 0
bestappr_real 172193
bestappr_real_max 28
bestappr_ser 49
carremod 8133547
check_kernel 21
chinese 16450
chinese1 35
chinese1_coprime_Z 70038
chinese1_coprime_Z_aux 57058
classno 133
classno2 42
conductor_part 161
contfrac0 259
contfracpnqn 140
corediscfact 175
eps 18431
equal1 518
err_oo 56
err_p 161
err_prec 196
fibo 14
find_order 448
gboundcf 1981833
gcf 7
gcf2 7
gener_Zp 357
get_Fp_field 13998
get_PHI 63
get_forms 119
get_quad 28
gisanypower 7000154
gissquare 0
gissquareall 0
gome 2613587
handle_pe 378
hclassno 14
hclassno2 14
hilbert 672
hilbertii 53109
icopy_lg 1980272
init_montdata 232557
is_char_2 535500
is_gener_Fl 33692
is_gener_Fp 124
is_gener_expo 33
isfundamental 14028
ispolygonal 1386
ispower 7001603
isprimepower 840091
issquare 142982
issquareall 144340
istotient 70000
istotient_i 621565
krois 507
kroiu 1210190
kronecker 4947494
krosi 26475
kross 65240
kroui 122
krouodd 26597
krouu 15905500
krouu_s 22133951
lcmii 2352288
lift_intmod 434
lift_padic 210
logint 56945
logint0 553
lucas 112
mod_to_frac 35
mod_to_rfrac 56
mpfact 56943
mphilbertoo 9968
mulu_interval 99853
odd_prime_divisors 34
ok_q 7
ome 21028840
opt_param 21
order 7
pgener_Fl 30884
pgener_Fl_local 38436
pgener_Fp 9072
pgener_Fp_local 9569
pgener_Zl 52
pgener_Zp 56
pnqn 14
polispower 56
polissquareall 1169
qfb_hash 10549
qfb_is_1 1323
qfb_pow 2247
qfbclassno0 133
qfi_comp 9877
quaddisc 14
quadregulator 42
quadunit 14
relative_order 112
remove2 34
rootsof1_Fl 231
rootsof1_Fp 0
rootsof1u_Fp 301
sersfcont 0
sfcont2 21
split_exponent 505708
split_lcm 77
sqr_primeform 2261
sqrt_Cipolla 8
sqrt_Cipolla_msqr 23
sqrt_Cipolla_sqr 449
sqrtint 17411
two_rank 119
u_is_gener_expo 15276
u_odd_prime_divisors 15423
u_remove2 15423
uisprimepower 540061
uissquare 115196
uissquareall 7968082
unegisfundamental 9387
update_f 28
update_g1 77
uposisfundamental 6559
znlog 168
znlog_rec 91
znorder 70
znprimroot 420
znstar 2912

Generated by: LCOV version 1.9