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 29863-97c2ec7fa5) Lines: 1612 1765 91.3 %
Date: 2025-01-10 09:08:43 Functions: 200 218 91.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
RgXQX_mul 0
RgXQX_powers 0
RgXQX_sqr 0
RgXV_prod 0
RgX_RgXQV_eval 0
RgX_RgXn_eval 0
RgX_Rg_eval_bk 0
RgX_affine 0
RgX_sqrhigh_i 0
RgX_sqrhigh_i2 0
RgXn_exp 0
RgXn_inv_FpXQX 0
RgXn_powu 0
RgXn_sqr_basecase 0
_RgX_mul 0
_gen_sub 0
_sub 0
_zeroXn 0
RgXn_div_FpXQX 7
RgXn_sqrt 7
RgXn_sqrhigh 14
RgXQX_RgXQ_mul 35
RgX_rem_FpXQX 70
RgXn_inv_FpX 91
rfrac_deflate 105
rfrac_deflate_max 105
rfrac_deflate_order 105
RgXn_div_FpX 119
RgXQV_RgXQ_mul 133
RgXn_reverse 154
RgX_sqr_FpXQX 196
QXY_QXQ_evalx 231
RgXY_degreex 288
RgXn_sqr2 315
RgXQM_mul 322
RgXX_to_RgM 322
RgXQ_trace 476
RgXnV_red_shallow 483
RgXn_powers 483
zero_FpXQX_mod 532
RgXV_maxdegree 588
RgXY_swap 952
RgX_RgXnV_eval 966
ZX_unscale_divpow 966
_zero 1155
RgXQV_red 1211
RgX_sqr_FpX 1421
QXQX_homogenous_evalpow 1652
_oneXn 1939
RgX_mul_FpXQX 2044
RgXn_powu_i 2286
RgXV_rescale 2401
RgX_divs 2660
QXV_QXQ_eval 2758
RgXQ_matrix_pow 2947
RgXV_RgV_eval 2947
do_QXQ_eval 2989
RgX_digits 3157
RgXY_derivx 3836
RgX_muls 3999
_mulXn 4528
RgXQ_norm 5144
RgXn_eval 5159
RgXV_unscale 5852
QX_ZXQV_eval 6447
QXQM_to_mod_shallow 6587
RgXQV_factorback 7118
RgM_to_RgXV_reverse 7202
RgXQ_powers 8561
QXQ_powers 8953
RgX_sqr_i 9121
RgX_sqrspec_basecase 9160
RgX_sqrspec 9199
_RgX_divrem 11333
ZXQ_powers 11508
RgX_pseudodivrem 11846
_sqrXn 11893
RgXQX_pseudodivrem 12084
RgXn_sqr 12152
QXQXV_to_mod 12614
RgXQM_red 12929
ZX_unscale_div 12997
RgX_sqr_QXQX 13432
QXQC_to_mod_shallow 14448
ZXQX_dvd 17293
QXQV_to_mod 18252
RgX_homogenize 18732
RgX_unscale 19845
RgM_to_RgXX 23466
_gen_zero 24184
RgXQX_translate 29685
RgXY_swapspec 31172
RgX_recip 31255
QXQX_to_mod 37415
RgX_normalize 39053
RgX_rem_QXQX 43187
RgX_splitting 43631
RgX_sqrspec_basecase_limb 50774
RgXn_expint 52926
RgX_integXn 56391
RgX_recip_shallow 59367
RgX_Rg_add_shallow 64814
RgX_mul2n 65268
RgXQC_red 67291
_sqr 67425
RgX_rem_FpX 68670
RgXV_to_RgM 78008
_pow 88307
RgXQ_pow 102412
_ZXQmul 111188
RgXQ_powu 115633
zero_FpX_mod 142563
RgXQX_divrem 145793
RgX_RgV_eval 166768
QXQ_to_mod 167587
ZXQ_powu 168503
RgX_mul_QXQX 171406
RgX_Rg_sub 179907
Kronecker_to_mod 186539
QXQX_to_mod_shallow 187037
RgV_to_RgX_reverse 190005
_ZXQsqr 200572
RgX_addspec 223470
RgX_div_by_X_x 250970
_mul 274886
get_Rg_algebra 281033
RgM_to_RgXV 303252
RgX_rotate_shallow 317037
RgV_to_RgM 335853
RgX_RgXQ_eval 411580
RgX_liftred 442618
RgXQX_red 486621
_gen_cmul 512818
RgX_addmulXn 516043
RgXn_div 584443
_gen_sqr 591648
_add 615719
RgXQX_pseudorem 629830
RgX_pseudorem 629830
RgXn_recip_shallow 638881
RgX_mul_FpX 666140
RgX_homogenous_evalpow 666388
_red 715597
QXQ_to_mod_shallow 797570
RgX_inflate 798644
RgXn_inv 807456
RgX_deriv 823432
RgX_valrem_inexact 851781
gen_bkeval 867412
RgXn_inv_fast 905031
RgXn_inv_i 905031
ZX_unscale2n 928233
RgX_deflate 985509
_one 1005589
ZX_unscale 1009704
_cmul 1027107
RgXn_div_fast 1284106
RgXn_div_i 1284106
RgX_sqr 1340386
RgX_sqr_fast 1352537
Rg_to_RgC 1353191
RgX_recipspec_shallow 1373097
ZX_z_unscale 1463633
RgV_to_RgX 1499632
RgX_shift 1564561
RgX_mulhigh_i2 1589258
RgX_mul_normalized 1718722
_gen_mul 1839510
_gen_nored 2027365
_gen_one 2068441
RgXn_div_gen 2188917
RgXn_mulhigh 2614491
RgX_mulhigh_i 2670897
RgX_blocks 2787616
RgX_mulXn 2978932
RgX_val 3641501
rem 4037911
RgX_rescale 4332645
Rg_RgX_sub 4854053
RgX_recip_i 5108437
RgX_translate_basecase 5955058
RgX_translate 5955485
RgX_renormalize_lg 6164235
RgXn_mul_basecase 6627959
Rg_get_0 6987155
RgX_Rg_divexact 7163062
RgX_neg 7772984
RgXn_red_shallow 7923984
RgX_addspec_shallow 8897282
RgXn_mul2 9413940
RgX_addmulXn_shallow 10048768
RgXn_mul 11061285
gen_bkeval_powers 12442682
RgX_to_RgC 13363706
RgX_divrem 14222797
gen_RgXQ_eval_powers 14490917
RgX_rem_fast 14541188
RgX_rem 14541200
_gen_add 19230289
brent_kung_optpow 19444124
RgX_mul_i 20913302
RgX_mulspec_basecase 21623949
RgX_Rg_add 22058826
RgX_mulspec 22353411
RgX_divrem_i 23468756
RgX_equal 24766245
RgX_Rg_div 30166114
RgX_even_odd 49630049
RgXspec_kill0 56512751
RgX_sub 63671051
RgX_mul 63821132
RgX_mul_fast 77553320
RgX_valrem 82283387
RgX_add 82434149
RgX_mulspec_basecase_limb 94293179
RgX_Rg_mul 134242776
Rg_get_1 156308764
RgX_shift_shallow 175211128

Generated by: LCOV version 1.16