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.17.0 lcov report (development 29536-db03280b45) Lines: 1620 1773 91.4 %
Date: 2024-09-17 09:03:02 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 448
RgXnV_red_shallow 483
RgXn_powers 483
zero_FpXQX_mod 532
RgXV_maxdegree 588
_zero 840
RgXY_swap 952
RgX_RgXnV_eval 966
ZX_unscale_divpow 966
RgXQV_red 1204
RgX_sqr_FpX 1421
QXQX_homogenous_evalpow 1652
_oneXn 1939
RgX_mul_FpXQX 2044
RgXn_powu_i 2286
QXV_QXQ_eval 2296
RgXV_rescale 2401
do_QXQ_eval 2527
RgX_divs 2660
RgXQ_matrix_pow 2898
RgXV_RgV_eval 2947
RgXY_derivx 3836
RgX_muls 3950
_mulXn 4528
RgXQ_norm 5144
RgXn_eval 5145
QX_ZXQV_eval 5642
RgXV_unscale 5761
QXQM_to_mod_shallow 6251
RgX_digits 6923
RgXQV_factorback 7013
RgM_to_RgXV_reverse 7097
QXQ_powers 8393
RgXQ_powers 8505
RgX_sqr_i 8855
RgX_sqrspec_basecase 8894
RgX_sqrspec 8933
ZXQ_powers 10955
RgX_pseudodivrem 11776
_sqrXn 11893
RgXQX_pseudodivrem 12014
ZX_unscale_div 12073
RgXn_sqr 12152
RgXQM_red 12257
QXQXV_to_mod 12509
QXQC_to_mod_shallow 13412
RgX_sqr_QXQX 13418
ZXQX_dvd 17093
QXQV_to_mod 17803
RgX_homogenize 18732
RgX_unscale 19707
RgM_to_RgXX 23466
RgXQX_translate 23630
_gen_zero 24184
_RgX_divrem 30352
RgX_recip 31171
RgXY_swapspec 31296
QXQX_to_mod 37212
RgX_rem_QXQX 38266
RgX_normalize 38906
RgX_splitting 43547
RgX_sqrspec_basecase_limb 50452
RgXn_expint 52877
RgX_integXn 56279
RgX_recip_shallow 57568
RgXQC_red 63875
RgX_Rg_add_shallow 64889
RgX_mul2n 65268
_sqr 67050
RgX_rem_FpX 68670
RgXV_to_RgM 77589
_pow 86459
RgXQ_pow 100480
RgXQX_pseudorem 103062
RgX_pseudorem 103062
_ZXQmul 113890
RgXQ_powu 115731
RgXQX_divrem 136667
zero_FpX_mod 152790
QXQX_to_mod_shallow 161788
QXQ_to_mod 166733
RgX_RgV_eval 166768
RgX_mul_QXQX 169306
RgX_Rg_sub 179413
Kronecker_to_mod 184425
ZXQ_powu 188550
RgV_to_RgX_reverse 189522
_ZXQsqr 213765
ZX_unscale2n 217319
RgX_addspec 223549
RgX_div_by_X_x 249136
_mul 272405
get_Rg_algebra 281034
RgM_to_RgXV 301122
RgX_homogenous_evalpow 312760
RgX_rotate_shallow 317037
RgV_to_RgM 333631
RgX_RgXQ_eval 401073
RgX_liftred 428562
RgXQX_red 467756
_gen_cmul 512818
RgX_addmulXn 516108
RgXn_div 584443
_gen_sqr 599506
_add 604716
RgXn_recip_shallow 638636
_red 704325
QXQ_to_mod_shallow 709916
RgX_inflate 797961
RgXn_inv 807454
RgX_mul_FpX 818173
RgX_deriv 820247
RgX_valrem_inexact 851483
gen_bkeval 858476
RgXn_inv_fast 905023
RgXn_inv_i 905023
RgX_deflate 977412
_one 983932
ZX_unscale 999771
_cmul 1005934
rem 1202346
RgX_sqr 1205935
RgX_sqr_fast 1218087
RgXn_div_fast 1283896
RgXn_div_i 1283896
Rg_to_RgC 1345351
RgX_recipspec_shallow 1379112
ZX_z_unscale 1451353
RgV_to_RgX 1494213
RgX_shift 1567508
RgX_mulhigh_i2 1589258
RgX_mul_normalized 1709468
_gen_mul 1842474
_gen_nored 2027457
_gen_one 2068551
RgXn_div_gen 2188702
RgXn_mulhigh 2613882
RgX_mulhigh_i 2670176
RgX_blocks 2787007
RgX_mulXn 2984903
RgX_val 3647045
RgX_recip_i 3652611
RgX_Rg_divexact 3948620
RgX_rescale 4323357
Rg_RgX_sub 4840912
RgX_neg 4991673
RgX_translate_basecase 5948585
RgX_translate 5949010
RgX_renormalize_lg 6215745
RgXn_mul_basecase 6627805
Rg_get_0 6974338
RgXn_red_shallow 7922219
RgX_addspec_shallow 8667803
RgX_addmulXn_shallow 9287787
RgXn_mul2 9413646
RgXn_mul 11059523
gen_bkeval_powers 12413347
RgX_to_RgC 13155797
RgX_divrem 14167648
RgX_rem_fast 14322608
RgX_rem 14322625
gen_RgXQ_eval_powers 14462892
RgX_Rg_add 18773645
_gen_add 19235206
brent_kung_optpow 19641923
RgX_mul_i 20877092
RgX_mulspec_basecase 21588375
RgX_mulspec 22317610
RgX_divrem_i 23341684
RgX_equal 24616404
RgX_Rg_div 29237403
RgX_even_odd 49521607
RgXspec_kill0 56441082
RgX_mul 61174552
RgX_sub 63544252
RgX_mul_fast 74904256
RgX_add 76592253
RgX_valrem 82087925
RgX_mulspec_basecase_limb 94162543
RgX_Rg_mul 126652594
Rg_get_1 156623505
RgX_shift_shallow 168777477

Generated by: LCOV version 1.16