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 - basemath - RgX.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.10.0 lcov report (development 20838-243a3c2) Lines: 1306 1456 89.7 %
Date: 2017-07-28 06:22:09 Functions: 140 157 89.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Kronecker_to_mod 189
QXQV_to_mod 1464
QXQXV_to_mod 595
QXQX_to_mod 1904
QXQX_to_mod_shallow 83153
QXQ_powers 1848
QXQ_to_mod 408405
QXQ_to_mod_copy 14795
QXV_QXQ_eval 1148
QXX_QXQ_eval 63
QX_ZXQV_eval 2520
RgM_to_RgXV 47836
RgM_to_RgXX 15211
RgV_to_RgM 103134
RgV_to_RgX 485378
RgV_to_RgX_reverse 149566
RgXQC_red 0
RgXQM_mul 0
RgXQM_red 0
RgXQV_RgXQ_mul 56
RgXQV_red 56
RgXQX_RgXQ_mul 28
RgXQX_divrem 19559
RgXQX_mul 0
RgXQX_pseudodivrem 53002
RgXQX_pseudorem 24975
RgXQX_red 3941
RgXQX_sqr 0
RgXQX_translate 5873
RgXQ_matrix_pow 287
RgXQ_minpoly_naive 56
RgXQ_norm 34710
RgXQ_pow 17716
RgXQ_powers 2275
RgXQ_powu 205594
RgXV_RgV_eval 2814
RgXV_to_RgM 2289
RgXV_unscale 224
RgXX_to_RgM 21
RgXY_degreex 1
RgXY_swap 224
RgXY_swapspec 11554
RgX_RgV_eval 124047
RgX_RgXQV_eval 0
RgX_RgXQ_eval 44940
RgX_RgXnV_eval 672
RgX_RgXn_eval 0
RgX_Rg_add 11572373
RgX_Rg_add_shallow 2422
RgX_Rg_div 22536819
RgX_Rg_divexact 532675
RgX_Rg_eval_bk 0
RgX_Rg_mul 69212058
RgX_Rg_sub 31935
RgX_add 27206126
RgX_addmulXn 677792
RgX_addmulXn_shallow 1921187
RgX_addspec 383785
RgX_addspec_shallow 3192501
RgX_blocks 103928
RgX_deflate 110066
RgX_deriv 211246
RgX_digits 0
RgX_div_by_X_x 35129
RgX_divrem 14394157
RgX_divs 1925
RgX_equal 25600657
RgX_even_odd 30224
RgX_get_0 131103
RgX_get_1 677164
RgX_inflate 244484
RgX_mul 11706740
RgX_mulXn 2857944
RgX_mul_normalized 414869
RgX_mulhigh_i 33816
RgX_muls 13881
RgX_mulspec 13721732
RgX_mulspec_basecase 12837859
RgX_mulspec_basecase_limb 74976836
RgX_neg 994965
RgX_normalize 1526
RgX_pseudodivrem 52848
RgX_pseudorem 24975
RgX_recip 504
RgX_recip_shallow 406798
RgX_recipspec_shallow 295619
RgX_renormalize_lg 720375
RgX_rescale 1456
RgX_rotate_shallow 315273
RgX_shift 3393235
RgX_shift_shallow 57143644
RgX_splitting 40614
RgX_sqr 328526
RgX_sqrhigh_i 0
RgX_sqrspec 330799
RgX_sqrspec_basecase 329662
RgX_sqrspec_basecase_limb 4176334
RgX_sub 11144404
RgX_to_RgC 4080182
RgX_translate 1017116
RgX_unscale 3878
RgX_val 2092983
RgX_valrem 42141546
RgX_valrem_inexact 6897
RgXnV_red_shallow 336
RgXn_eval 1799
RgXn_exp 12586
RgXn_inv 112602
RgXn_mul 3668124
RgXn_mul_basecase 3106108
RgXn_mulhigh 33816
RgXn_powers 336
RgXn_powu 0
RgXn_powu_i 1526
RgXn_red_shallow 81055
RgXn_reverse 84
RgXn_sqr 15666
RgXn_sqr_basecase 686
RgXn_sqrhigh 0
RgXn_sqrt 0
RgXspec_kill0 32218210
Rg_RgX_sub 380072
Rg_to_RgC 679204
ZXQX_dvd 3574
ZX_translate 376196
ZX_unscale 7336
ZX_unscale2n 18147
ZX_unscale_div 1176
ZX_z_unscale 892605
_RgX_divrem 0
_add 65107
_cmul 110621
_gen_add 20663605
_gen_cmul 351407
_gen_mul 605719
_gen_nored 728360
_gen_one 743088
_gen_sqr 193741
_gen_sub 0
_gen_zero 14483
_mul 101896
_mulXn 1190
_one 105532
_oneXn 1407
_red 70623
_sqr 248393
_sqrXn 1806
_sub 0
_zero 105
_zeroXn 0
brent_kung_optpow 2277093
do_QXQ_eval 1211
gen_RgXQ_eval_powers 9896138
gen_bkeval 1059872
gen_bkeval_powers 6398563
get_Rg_algebra 92614
rem 711707

Generated by: LCOV version 1.11