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 30565-738e569de9) Lines: 1631 1787 91.3 %
Date: 2025-11-30 09:23:42 Functions: 205 223 91.9 %
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_Rg_translate_FpX 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
RgX_Rg_translate_FpXQX 7
RgXn_div_FpXQX 7
RgXn_sqrt 7
RgXn_sqrhigh 14
RgXQX_RgXQ_mul 35
RgX_rem_FpXQX 70
RgXn_inv_FpX 91
RgXn_div_FpX 119
RgXQV_RgXQ_mul 133
rfrac_deflate 140
rfrac_deflate_max 140
rfrac_deflate_order 140
RgXn_reverse 154
RgX_sqr_FpXQX 196
RgXn_sqr2 315
RgXQM_mul 322
RgXX_to_RgM 322
QXY_QXQ_evalx 371
RgXQ_trace 476
RgXnV_red_shallow 483
RgXn_powers 483
RgXV_maxdegree 588
zero_FpXQX_mod 616
RgX_RgXnV_eval 966
_zero 1232
RgX_homogenize_deg 1260
ZX_unscale_divpow 1393
RgX_sqr_FpX 1407
RgXQV_red 1414
QXQX_homogenous_evalpow 1652
_oneXn 1939
RgXY_swap 2051
RgX_mul_FpXQX 2079
RgXn_powu_i 2286
RgXV_rescale 2401
RgXQ_norm 2680
RgX_divs 2863
RgXQ_matrix_pow 2940
RgXV_RgV_eval 2947
RgX_digits 3157
QXV_QXQ_eval 3248
do_QXQ_eval 3619
RgXY_derivx 3836
RgX_muls 3992
_mulXn 4528
RgXn_eval 5593
RgXV_unscale 6559
QXQM_to_mod_shallow 6720
RgXQV_factorback 7118
RgM_to_RgXV_reverse 7202
QX_ZXQV_eval 7637
RgXQ_powers 8610
QXQ_powers 9597
_RgX_divrem 11333
RgX_pseudodivrem 11818
_sqrXn 11893
RgXQX_pseudodivrem 12063
RgXn_sqr 12152
ZXQ_powers 12152
QXQXV_to_mod 12733
ZX_unscale_div 12997
RgXQM_red 13195
RgX_sqr_QXQX 13425
QXQC_to_mod_shallow 14854
ZXQX_dvd 17734
RgX_homogenize 18732
QXQV_to_mod 22338
RgM_to_RgXX 23686
_gen_zero 24184
RgX_affine 30226
RgX_recip 31423
RgXY_swapspec 32769
RgXQX_RgXQ_translate 33584
QXQX_to_mod 37471
RgX_sqr_i 37961
RgX_sqrspec_basecase 38000
RgX_sqrspec 38039
RgX_normalize 39711
RgX_splitting 43631
RgX_rem_QXQX 49851
RgX_unscale 52305
RgXn_expint 52920
RgX_integXn 56377
RgX_recip_shallow 59388
RgX_Rg_add_shallow 65103
RgX_mul2n 65268
RgXQC_red 68187
RgX_rem_FpX 68327
_sqr 74879
RgXV_to_RgM 79032
_pow 88307
RgX_sqrspec_basecase_limb 100082
RgXQ_pow 102160
zero_FpX_mod 102627
_ZXQmul 111208
RgXQ_powu 120519
RgXQX_pseudorem 138871
RgX_pseudorem 138871
RgXQX_divrem 156857
RgX_RgV_eval 166768
ZXQ_powu 168512
QXQ_to_mod 169946
RgX_mul_QXQX 170888
Kronecker_to_mod 185965
RgV_to_RgX_reverse 188283
_ZXQsqr 200624
QXQX_to_mod_shallow 204096
RgX_addspec 222394
RgX_div_by_X_x 265523
_mul 281004
get_Rg_algebra 294912
RgM_to_RgXV 303252
RgX_rotate_shallow 317037
RgV_to_RgM 336724
RgX_homogenous_evalpow 398901
RgX_RgXQ_eval 417527
RgX_liftred 454903
RgXQX_red 508139
_gen_cmul 512818
RgX_addmulXn 514864
RgXn_div 584450
RgX_mul_FpX 609812
_add 623400
_gen_sqr 635447
RgXn_recip_shallow 642795
ZX_unscale 674286
_red 724316
RgXn_inv 807480
RgX_deriv 830966
QXQ_to_mod_shallow 840695
RgX_valrem_inexact 852371
gen_bkeval 881568
RgX_inflate 885425
RgXn_inv_fast 906399
RgXn_inv_i 906399
_one 1019767
_cmul 1040668
rem 1050978
ZX_z_unscale 1171635
RgX_deflate 1188007
RgX_Rg_sub 1226075
RgXn_div_fast 1286750
RgXn_div_i 1286750
RgX_sqr 1299201
RgX_sqr_fast 1311353
Rg_to_RgC 1360843
RgX_shift 1578036
RgX_mulhigh_i2 1595393
RgX_mul_normalized 1721047
ZX_unscale2n 1974192
_gen_mul 1974308
RgXY_degreex 2022694
_gen_nored 2150265
_gen_one 2192772
RgXn_div_gen 2192935
RgV_to_RgX 2289174
RgX_recipspec_shallow 2583600
RgXn_mulhigh 2621480
RgX_mulhigh_i 2677870
RgX_blocks 2794675
RgX_mulXn 2997279
RgX_val 3678154
RgX_recip_i 3751464
RgX_rescale 4344746
Rg_RgX_sub 4954627
RgX_Rg_divexact 5262354
RgX_Rg_translate_basecase 5710308
RgX_Rg_translate_i 5710497
RgX_Rg_translate_fast 6072034
RgX_Rg_translate 6072038
RgXn_mul_basecase 6658643
Rg_get_0 6942982
RgX_neg 7451833
RgX_renormalize_lg 7899130
RgXn_red_shallow 7950629
RgX_addspec_shallow 8855341
RgXn_mul2 9453356
RgX_addmulXn_shallow 9531093
RgXn_mul 11102911
gen_bkeval_powers 12145031
gen_RgXQ_eval_powers 14037170
RgX_divrem 14181221
RgX_rem_fast 14700621
RgX_rem 14700634
RgX_to_RgC 15070192
brent_kung_optpow 19610071
_gen_add 19651554
RgX_divrem_i 23433407
RgX_equal 24799480
RgX_Rg_div 30730183
RgX_mulspec_basecase 34221574
RgX_mul_i 38851398
RgX_mulspec 40287987
RgX_Rg_add 42746612
RgX_even_odd 49767991
RgX_sub 72863937
RgX_valrem 80754381
RgXspec_kill0 81798270
RgX_mul 105485745
RgX_mulspec_basecase_limb 111360664
RgX_mul_fast 119266525
RgX_add 143435439
Rg_get_1 156959571
RgX_shift_shallow 177402561
RgX_Rg_mul 199291067

Generated by: LCOV version 1.16