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.18.1 lcov report (development 29873-a0b27995a4) Lines: 1612 1765 91.3 %
Date: 2025-01-15 09:09:42 Functions: 200 218 91.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Kronecker_to_mod 186574
QXQC_to_mod_shallow 14448
QXQM_to_mod_shallow 6587
QXQV_to_mod 18269
QXQXV_to_mod 12613
QXQX_homogenous_evalpow 1652
QXQX_to_mod 37413
QXQX_to_mod_shallow 189060
QXQ_powers 8974
QXQ_to_mod 167579
QXQ_to_mod_shallow 804451
QXV_QXQ_eval 2779
QXY_QXQ_evalx 231
QX_ZXQV_eval 6489
RgM_to_RgXV 301237
RgM_to_RgXV_reverse 7202
RgM_to_RgXX 23480
RgV_to_RgM 335668
RgV_to_RgX 1491461
RgV_to_RgX_reverse 190005
RgXQC_red 67291
RgXQM_mul 322
RgXQM_red 12929
RgXQV_RgXQ_mul 133
RgXQV_factorback 7118
RgXQV_red 1211
RgXQX_RgXQ_mul 35
RgXQX_divrem 147718
RgXQX_mul 0
RgXQX_powers 0
RgXQX_pseudodivrem 12098
RgXQX_pseudorem 630457
RgXQX_red 487993
RgXQX_sqr 0
RgXQX_translate 29685
RgXQ_matrix_pow 2947
RgXQ_norm 5144
RgXQ_pow 102412
RgXQ_powers 8561
RgXQ_powu 116502
RgXQ_trace 476
RgXV_RgV_eval 2947
RgXV_maxdegree 588
RgXV_prod 0
RgXV_rescale 2401
RgXV_to_RgM 78408
RgXV_unscale 6229
RgXX_to_RgM 322
RgXY_degreex 288
RgXY_derivx 3836
RgXY_swap 952
RgXY_swapspec 31116
RgX_RgV_eval 166768
RgX_RgXQV_eval 0
RgX_RgXQ_eval 412977
RgX_RgXnV_eval 966
RgX_RgXn_eval 0
RgX_Rg_add 22064325
RgX_Rg_add_shallow 65015
RgX_Rg_div 30176205
RgX_Rg_divexact 7165813
RgX_Rg_eval_bk 0
RgX_Rg_mul 134273614
RgX_Rg_sub 181774
RgX_add 82400564
RgX_addmulXn 516051
RgX_addmulXn_shallow 10060153
RgX_addspec 223478
RgX_addspec_shallow 8905450
RgX_affine 0
RgX_blocks 2787616
RgX_deflate 985951
RgX_deriv 824455
RgX_digits 3157
RgX_div_by_X_x 251016
RgX_divrem 14230982
RgX_divrem_i 23501471
RgX_divs 2667
RgX_equal 24779622
RgX_even_odd 49719082
RgX_homogenize 18732
RgX_homogenous_evalpow 666373
RgX_inflate 798599
RgX_integXn 56391
RgX_liftred 442702
RgX_mul 63743062
RgX_mul2n 65268
RgX_mulXn 2978932
RgX_mul_FpX 666140
RgX_mul_FpXQX 2044
RgX_mul_QXQX 171441
RgX_mul_fast 77475250
RgX_mul_i 20938868
RgX_mul_normalized 1718722
RgX_mulhigh_i 2670896
RgX_mulhigh_i2 1589258
RgX_muls 3999
RgX_mulspec 22379010
RgX_mulspec_basecase 21649537
RgX_mulspec_basecase_limb 94371074
RgX_neg 7782859
RgX_normalize 39102
RgX_pseudodivrem 11860
RgX_pseudorem 630457
RgX_recip 31255
RgX_recip_i 5115783
RgX_recip_shallow 59367
RgX_recipspec_shallow 1375674
RgX_rem 14572150
RgX_rem_FpX 68670
RgX_rem_FpXQX 70
RgX_rem_QXQX 43194
RgX_rem_fast 14572136
RgX_renormalize_lg 6164234
RgX_rescale 4340611
RgX_rotate_shallow 317037
RgX_shift 1564561
RgX_shift_shallow 175408110
RgX_splitting 43631
RgX_sqr 1331824
RgX_sqr_FpX 1421
RgX_sqr_FpXQX 196
RgX_sqr_QXQX 13432
RgX_sqr_fast 1343976
RgX_sqr_i 9128
RgX_sqrhigh_i 0
RgX_sqrhigh_i2 0
RgX_sqrspec 9206
RgX_sqrspec_basecase 9167
RgX_sqrspec_basecase_limb 50795
RgX_sub 63770352
RgX_to_RgC 13366624
RgX_translate 5963808
RgX_translate_basecase 5963386
RgX_unscale 21168
RgX_val 3641501
RgX_valrem 82371125
RgX_valrem_inexact 852119
RgXnV_red_shallow 483
RgXn_div 584443
RgXn_div_FpX 119
RgXn_div_FpXQX 7
RgXn_div_fast 1284106
RgXn_div_gen 2188919
RgXn_div_i 1284106
RgXn_eval 5159
RgXn_exp 0
RgXn_expint 52925
RgXn_inv 807453
RgXn_inv_FpX 91
RgXn_inv_FpXQX 0
RgXn_inv_fast 905027
RgXn_inv_i 905028
RgXn_mul 11061283
RgXn_mul2 9413940
RgXn_mul_basecase 6627959
RgXn_mulhigh 2614491
RgXn_powers 483
RgXn_powu 0
RgXn_powu_i 2286
RgXn_recip_shallow 641718
RgXn_red_shallow 7923977
RgXn_reverse 154
RgXn_sqr 12152
RgXn_sqr2 315
RgXn_sqr_basecase 0
RgXn_sqrhigh 14
RgXn_sqrt 7
RgXspec_kill0 56563965
Rg_RgX_sub 4866349
Rg_get_0 6987183
Rg_get_1 156312608
Rg_to_RgC 1354836
ZXQX_dvd 17321
ZXQ_powers 11529
ZXQ_powu 168507
ZX_unscale 1009704
ZX_unscale2n 928226
ZX_unscale_div 12997
ZX_unscale_divpow 966
ZX_z_unscale 1463670
_RgX_divrem 11333
_RgX_mul 0
_ZXQmul 111187
_ZXQsqr 200582
_add 617566
_cmul 1030355
_gen_add 19229613
_gen_cmul 512818
_gen_mul 1839360
_gen_nored 2027041
_gen_one 2068202
_gen_sqr 591628
_gen_sub 0
_gen_zero 24184
_mul 275321
_mulXn 4528
_one 1008839
_oneXn 1939
_pow 88307
_red 717811
_sqr 67461
_sqrXn 11893
_sub 0
_zero 1155
_zeroXn 0
brent_kung_optpow 19445667
do_QXQ_eval 3010
gen_RgXQ_eval_powers 14494429
gen_bkeval 868632
gen_bkeval_powers 12446825
get_Rg_algebra 281014
rem 4051542
rfrac_deflate 105
rfrac_deflate_max 105
rfrac_deflate_order 105
zero_FpXQX_mod 532
zero_FpX_mod 142563

Generated by: LCOV version 1.16