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 to exceed 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.12.1 lcov report (development 24782-f7724578b4) Lines: 1518 1689 89.9 %
Date: 2019-12-06 05:56:26 Functions: 181 197 91.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Kronecker_to_mod 176485
QXQC_to_mod_shallow 23926
QXQM_to_mod_shallow 7476
QXQV_to_mod 5180
QXQXV_to_mod 1764
QXQX_to_mod 5873
QXQX_to_mod_shallow 189220
QXQ_powers 3395
QXQ_to_mod 1218561
QXQ_to_mod_copy 31724
QXV_QXQ_eval 1946
QXX_QXQ_eval 63
QX_ZXQV_eval 4291
RgM_to_RgXV 60807
RgM_to_RgXX 17629
RgV_to_RgM 136330
RgV_to_RgX 540706
RgV_to_RgX_reverse 158980
RgXQC_red 109186
RgXQM_mul 0
RgXQM_red 14826
RgXQV_RgXQ_mul 77
RgXQV_red 1106
RgXQX_RgXQ_mul 4417
RgXQX_divrem 110988
RgXQX_homogenous_evalpow 1792
RgXQX_mul 12789
RgXQX_powers 448
RgXQX_pseudodivrem 7754
RgXQX_pseudorem 28587
RgXQX_red 550545
RgXQX_sqr 1792
RgXQX_translate 21882
RgXQ_matrix_pow 560
RgXQ_norm 35973
RgXQ_pow 19108
RgXQ_powers 5215
RgXQ_powu 18916
RgXV_RgV_eval 2905
RgXV_to_RgM 5685
RgXV_unscale 651
RgXX_to_RgM 308
RgXY_degreex 176
RgXY_swap 952
RgXY_swapspec 20512
RgX_RgV_eval 155358
RgX_RgXQV_eval 0
RgX_RgXQ_eval 112475
RgX_RgXnV_eval 714
RgX_RgXn_eval 0
RgX_Rg_add 12657696
RgX_Rg_add_shallow 2879
RgX_Rg_div 23912932
RgX_Rg_divexact 530691
RgX_Rg_eval_bk 0
RgX_Rg_mul 72384827
RgX_Rg_sub 33256
RgX_add 22244968
RgX_addmulXn 502778
RgX_addmulXn_shallow 2593812
RgX_addspec 210814
RgX_addspec_shallow 3292424
RgX_blocks 118212
RgX_deflate 151498
RgX_deriv 226067
RgX_digits 4354
RgX_div_by_X_x 54789
RgX_divrem 11431712
RgX_divrem_i 12721727
RgX_divs 2625
RgX_equal 24670400
RgX_even_odd 5796168
RgX_homogenous_evalpow 5040
RgX_inflate 594415
RgX_integXn 14210
RgX_liftred 485956
RgX_mul 46574567
RgX_mulXn 2974898
RgX_mul_FpX 498994
RgX_mul_FpXQX 2037
RgX_mul_QXQX 162479
RgX_mul_fast 49076633
RgX_mul_i 7701663
RgX_mul_normalized 730211
RgX_mulhigh_i 62204
RgX_mulhigh_i2 3044
RgX_muls 511
RgX_mulspec 9118769
RgX_mulspec_basecase 8545676
RgX_mulspec_basecase_limb 48205189
RgX_neg 1385573
RgX_normalize 13412
RgX_pseudodivrem 7558
RgX_pseudorem 28587
RgX_recip 2170
RgX_recip_shallow 460036
RgX_recipspec_shallow 493650
RgX_rem 6811505
RgX_rem_FpX 67466
RgX_rem_FpXQX 63
RgX_rem_QXQX 74343
RgX_rem_fast 6811505
RgX_renormalize_lg 816958
RgX_rescale 479918
RgX_rotate_shallow 316113
RgX_shift 1534383
RgX_shift_shallow 71961229
RgX_splitting 40922
RgX_sqr 130667
RgX_sqr_FpX 1260
RgX_sqr_FpXQX 196
RgX_sqr_QXQX 12312
RgX_sqr_fast 142518
RgX_sqr_i 7658
RgX_sqrhigh_i 0
RgX_sqrhigh_i2 0
RgX_sqrspec 7736
RgX_sqrspec_basecase 7697
RgX_sqrspec_basecase_limb 41975
RgX_sub 22779167
RgX_to_RgC 7355587
RgX_translate 1454782
RgX_translate_basecase 1454474
RgX_unscale 10192
RgX_val 2497069
RgX_valrem 39008767
RgX_valrem_inexact 16471
RgXnV_red_shallow 357
RgXn_eval 6734
RgXn_exp 0
RgXn_expint 12971
RgXn_inv 83009
RgXn_inv_FpX 0
RgXn_inv_FpXQX 0
RgXn_inv_fast 83009
RgXn_inv_i 126625
RgXn_mul 2439862
RgXn_mul2 2285044
RgXn_mul_basecase 2193645
RgXn_mulhigh 47994
RgXn_powers 357
RgXn_powu 0
RgXn_powu_i 2216
RgXn_recip_shallow 47427
RgXn_red_shallow 2263729
RgXn_reverse 91
RgXn_sqr 11851
RgXn_sqr2 238
RgXn_sqr_basecase 0
RgXn_sqrhigh 0
RgXn_sqrt 0
RgXspec_kill0 21486339
Rg_RgX_sub 583219
Rg_get_0 6972035
Rg_get_1 3543239
Rg_to_RgC 767071
ZXQX_dvd 8487
ZXQ_powu 163666
ZX_unscale 7273
ZX_unscale2n 63281
ZX_unscale_div 1190
ZX_z_unscale 372294
_RgX_divrem 17766
_ZXQmul 50460
_ZXQsqr 159049
_add 141459
_cmul 254102
_gen_add 13986912
_gen_cmul 479423
_gen_mul 938296
_gen_nored 1085090
_gen_one 1106856
_gen_sqr 307432
_gen_sub 0
_gen_zero 21133
_mul 47877
_mulXn 4234
_one 251477
_oneXn 1477
_red 153212
_sqr 57066
_sqrXn 11613
_sub 0
_zero 553
_zeroXn 0
brent_kung_optpow 4266249
do_QXQ_eval 2009
gen_RgXQ_eval_powers 7062049
gen_bkeval 422571
gen_bkeval_powers 5875265
get_Rg_algebra 140400
rem 533427
rfrac_deflate 63
rfrac_deflate_max 63
rfrac_deflate_order 63
zero_FpXQX_mod 532
zero_FpX_mod 150725

Generated by: LCOV version 1.13